Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/opensauce04/snipe
A simple-to-use command-line file finder and editor launcher
https://github.com/opensauce04/snipe
Last synced: 5 days ago
JSON representation
A simple-to-use command-line file finder and editor launcher
- Host: GitHub
- URL: https://github.com/opensauce04/snipe
- Owner: OpenSauce04
- License: gpl-3.0
- Created: 2024-11-01T14:13:57.000Z (2 months ago)
- Default Branch: master
- Last Pushed: 2024-11-15T11:25:47.000Z (about 2 months ago)
- Last Synced: 2024-11-15T12:26:52.174Z (about 2 months ago)
- Language: Crystal
- Homepage:
- Size: 33.2 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE.txt
Awesome Lists containing this project
README
# Snipe
A simple-to-use command-line file finder and editor launcher## What is this?
Snipe is a file finder designed to be used as part of a command-line development environment for repeatedly searching for and opening code files in a project's code tree.To search for a file, run `snipe` to open the search interface and type in the name of the file you want to open.
When a file is selected with the Enter key, it is immediately opened using the executable defined in your `EDITOR` environment variable, and when the editor is closed, you are returned to the search interface.
This way, Snipe is always available at a moment's notice by closing the currently open file, making jumping between many different files quick and seamless.
## How does seaching work/ How does it differ from fuzzy finders?
Unlike existing "fuzzy finder" tools, Snipe doesn't use a fuzzy finding algorithm.When processing a search query, Snipe doesn't match any text before the final directory seperator (/). This way, directory names are not included in the results unless they are explicitly stated.
For example, say there is a file in the location `foo/bar/baz.txt`. This table demonstrates whether the following queries will find the file:
✅ `foo/bar/baz.txt` \
✅ `bar/baz.txt` \
✅ `baz.txt` \
✅ `baz` \
❌ `foo/bar` \
✅ `foo/bar/` \
❌ `foo/` \
✅ `bar/` \
❌ `bar`## Why does this exist?
This project came from a desire to explore alternative methods of programming after deciding that I wanted to move away from using VSCode.While looking at the available options I discovered the [Micro](https://github.com/zyedidia/micro) editor, and while the editor itself was functionally appealing, I realized that needing to type out the full path of each code file I wanted to open was slow.
I tried out a few existing finder programs, but wasn't able to find any that behaved the way I wanted them to. Naturally I then took the typical programmer approach of spending hours of my time creating tool that saves a few seconds.
This likely won't be part of my main workflow going forwards as I will inevitably end up using Vim or Emacs or something, but writing this was fun regardless!
## Building from source
1. Install the [Crystal](https://crystal-lang.org/) programming language
2. Clone this respository
3. Run `shards install` to install library dependencies
4. Run `make build` to build the program
5. The final executable will be built at `build/snipe`