Snip is a minimal command-line snippet manager designed for developers who value simplicity and efficiency. Manage, view, and edit your snippets with intuitive commands, and benefit from features like auto-completion and Git integration. Experience seamless access to your code snippets through your favorite shell, making your coding smoother and more organized.
Snip is a sleek and minimal command-line snippet manager designed for developers who want to efficiently manage their code snippets directly from the terminal. With Snip, you can effortlessly create, edit, and delete snippets while benefiting from robust command-line features.
Key Features:
- Simple Snippet Management: Easily view and manage your snippets with intuitive command-line commands.
- Auto-completion Support: Enjoy seamless command-line auto-completion for snippet names across various shells including
bash
,zsh
,fish
, andpowershell
. - Fuzzy Finding Integration: Leverage integration with
fzf
for fuzzy completion, enhancing navigation and snippet retrieval in yourzsh
shell. - Syntax Highlighting: Benefit from syntax highlighting to quickly identify code structure, making your snippets more readable.
- Git Integration: Sync your snippets with a remote git repository, allowing for version control and easy collaboration.
Example Usage:
View a Snippet:
Run the command to display a snippet:
snip {snippet_name}
With fuzzy completion enabled for zsh
, you can simply type snip **
and press tab to easily find desired snippets.
Edit Snippets:
To open your snippets repository in your preferred editor, use:
snip edit
To create or edit a specific snippet:
snip edit {snippet_path}
To remove a snippet:
snip rm {snippet_path} # Add -r flag for recursive deletion
Syncing Snippets with Git:
Update your remote repository with changes using:
snip sync [optional commit message]
This command automatically handles pulling, adding, committing, and pushing changes to your remote repository.
Getting Started:
- Start by installing Snip and enabling auto-completion for a smoother experience.
- Customize Snip to suit your workflow, including setting a dedicated snippets directory or enabling syntax highlighting to enhance visibility.
- Explore the multi-tenancy feature to manage multiple instances of snippets seamlessly.
Snip is not just a tool; it transforms the way developers handle code snippets in their daily workflow. Embrace efficiency and improve your coding experience with Snip today!