A CLI (snip-cli) Tool for Managing Neovim and VSCode Snippets
Note: This is an additional tools to be used with my Neovide Neovim rust setup.
VSCode Snippet Compatible
Installation
- You can Download and Install snip-cli on Releases Page Note: on MacOS you might need to go to System Preferences > Security & Privacy > General and click Open Anyway to install it
Note: on Windows you might need to Add the command to ENV PATH
- Install it using Cargo
Managing Multiple Snippets File for Different Languages
You can use the command snip config <path>
to change the Snippets File on Runtime.
Note: This is quite useful when you want to manage different Snippets File for different languages.
Location of Config Path
The DEFAULT_CONFIG_PATH
is ~/.config/nvim/snippets/rust/rust.json
as set on src/constants.rs
and is used during the build process,
but you can change it by setting the SNIP_CONFIG_PATH
environment variable.
Usage:
- Help
# or
)
- Add new snippet
# help
# Add Snippet
- Remove snippet
# help
# Remove Snippet
- List all snippets
# help
# Usage
| ()# List all Keys
# List all Prefixes
- Update Key
# help
# Update Key
&
&
- Update Snippet
# help
# Update snippet Value
- Search Snippet
# help
# Search Snippet
| ()
&
)
- Show Snippet
# help
# Show Snippet
&
| | |
| | |
| | |
| | ; |
| | |
| | |
| | |
| | |
- Config Snippet Note: This can be used to switch Configuration e.g. you wanna manage Python Snippet , you can do just pass in the PATH to that configuration file.
# help
# Config Snippet