1- # A CLI (snipr ) Tool for Managing Neovim and VSCode Snippets
1+ # A CLI (snip-cli ) Tool for Managing Neovim and VSCode Snippets
22
3- [ ![ Rust Build and Test] ( https://github.com/codeitlikemiley/snipr /actions/workflows/test.yml/badge.svg )] ( https://github.com/codeitlikemiley/snipr /actions/workflows/test.yml )
3+ [ ![ Rust Build and Test] ( https://github.com/codeitlikemiley/snip-cli /actions/workflows/test.yml/badge.svg )] ( https://github.com/codeitlikemiley/snip-cli /actions/workflows/test.yml )
44
5- [ ![ release] ( https://github.com/codeitlikemiley/snipr /actions/workflows/release.yml/badge.svg )] ( https://github.com/codeitlikemiley/snipr /actions/workflows/release.yml )
5+ [ ![ release] ( https://github.com/codeitlikemiley/snip-cli /actions/workflows/release.yml/badge.svg )] ( https://github.com/codeitlikemiley/snip-cli /actions/workflows/release.yml )
66
77Note: This is an additional tools to be used with my [ Neovide Neovim] ( https://github.com/codeitlikemiley/nvim ) rust setup.
88
99> VSCode Snippet Compatible
1010
1111## Installation
1212
13- 1 . You can Download and Install [ snipr ] ( https://github.com/codeitlikemiley/snipr /releases ) on Releases Page
13+ 1 . You can Download and Install [ snip-cli ] ( https://github.com/codeitlikemiley/snip-cli /releases ) on Releases Page
1414Note: on MacOS you might need to go to System Preferences > Security & Privacy > General and click Open Anyway to install it
1515
1616Note: on Windows you might need to Add the command to ENV PATH
1717
18- or Install it using Cargo
18+ 2 . Install it using Cargo
1919
2020``` sh
21- cargo install snipr
22- ```
23-
24-
25-
26- 2 . Build it from source
27- ### Clone
28- ``` sh
29- git clone htps://github.com/codeitlikemiley/snipr.git
30- cd snipr
31- ```
32-
33- ### For MacOS
34- ``` sh
35- ./provision.sh
36- ```
37-
38- ### For Linux
39- ``` sh
40- cargo build --release
41- mv ./target/release/snipr /usr/local/bin/snipr
42- chmod +x /usr/local/bin/snipr
43- ```
44-
45- ### For Windows
46- ``` sh
47- cargo build --release
48-
49- # Replace 'YourUsername' with your actual username
50- Move-Item .\t arget\r elease\s nipr.exe C:\U sers\Y ourUsername\b in\s nipr.exe
51-
52- # Again, replace 'YourUsername' with your actual username
53- $env :Path += " ;C:\Users\YourUsername\bin"
21+ cargo install snip-cli --bin snip
5422```
5523
5624## Managing Multiple Snippets File for Different Languages
5725
58- You can use the command ` snipr config <path>` to change the Snippets File on Runtime.
26+ You can use the command ` snip config <path>` to change the Snippets File on Runtime.
5927
6028Note: This is quite useful when you want to manage different Snippets File for different languages.
6129
@@ -69,20 +37,20 @@ but you can change it by setting the `SNIP_CONFIG_PATH` environment variable.
69371 . Help
7038
7139``` sh
72- snipr
40+ snip
7341# or
74- snipr --help
42+ snip --help
7543```
7644
7745<details >
7846<summary >Output</summary >
7947
8048``` sh
81- snipr
49+ snip
8250/Users/uriah/.config/nvim/snippets/rust/rust.json
8351A CLI tool for managing Neovim LuaSnip Rust snippets
8452
85- Usage: snipr < COMMAND>
53+ Usage: snip < COMMAND>
8654
8755Commands:
8856 add Adds entry to Snippet Collection file
@@ -104,38 +72,38 @@ Options:
104722. Add new snippet
10573` ` ` sh
10674# help
107- snipr add --help
75+ snip add --help
10876# Add Snippet
109- snipr add --key < key> --value < value> --description < description> -- " <snippet>"
77+ snip add --key < key> --value < value> --description < description> -- " <snippet>"
11078` ` `
11179
112803. Remove snippet
11381
11482` ` ` sh
11583# help
116- snipr remove --help
84+ snip remove --help
11785# Remove Snippet
118- snipr remove --key < key>
86+ snip remove --key < key>
11987` ` `
12088
121894. List all snippets
12290
12391` ` ` sh
12492# help
125- snipr ls --help
93+ snip ls --help
12694# Usage
127- snipr ls < LIST_OPTION | (key or prefix)>
95+ snip ls < LIST_OPTION | (key or prefix)>
12896# List all Keys
129- snipr ls key
97+ snip ls key
13098# List all Prefixes
131- snipr ls prefix
99+ snip ls prefix
132100` ` `
133101
134102< details>
135103< summary> Output< /summary>
136104
137105` ` ` sh
138- snipr ls key
106+ snip ls key
139107/Users/uriah/.config/nvim/snippets/rust/rust.json
140108[src/main.rs:468] list_option = Key
141109impl_iterator
@@ -156,16 +124,16 @@ impl_clone_single_field
156124
157125` ` ` sh
158126# help
159- snipr update-key --help
127+ snip update-key --help
160128# Update Key
161- snipr update-key --old-key < old-key> --new-key < new-key>
129+ snip update-key --old-key < old-key> --new-key < new-key>
162130` ` `
163131
164132< details>
165133< summary> Output< /summary>
166134
167135` ` ` sh
168- snipr update-key --old-key " Fuzz match String" --new-key " fuzzy-match-string"
136+ snip update-key --old-key " Fuzz match String" --new-key " fuzzy-match-string"
169137/Users/uriah/.config/nvim/snippets/rust/rust.json
170138[src/main.rs:499] & old_key = " Fuzz match String"
171139[src/main.rs:499] & new_key = " fuzzy-match-string"
@@ -177,25 +145,25 @@ snipr update-key --old-key "Fuzz match String" --new-key "fuzzy-match-string"
177145
178146` ` ` sh
179147# help
180- snipr edit --help
148+ snip edit --help
181149# Update snippet Value
182- snipr edit --key < key> --prefix < prefix> --description < description> -- " <snippet>"
150+ snip edit --key < key> --prefix < prefix> --description < description> -- " <snippet>"
183151` ` `
184152
1851537. Search Snippet
186154
187155` ` ` sh
188156# help
189- snipr search --help
157+ snip search --help
190158# Search Snippet
191- snipr search < ID | (key or prefix)> -- " <search_term>"
159+ snip search < ID | (key or prefix)> -- " <search_term>"
192160` ` `
193161
194162< details>
195163< summary> Output< /summary>
196164
197165` ` ` sh
198- snipr search key -- impl
166+ snip search key -- impl
199167/Users/uriah/.config/nvim/snippets/rust/rust.json
200168[src/main.rs:490] id = Some(
201169 Key,
@@ -216,16 +184,16 @@ impl_partialeq_single_field
216184
217185` ` ` sh
218186# help
219- snipr show --help
187+ snip show --help
220188# Show Snippet
221- snipr show < key_id>
189+ snip show < key_id>
222190` ` `
223191
224192< details>
225193< summary> Output< /summary>
226194
227195` ` ` sh
228- snipr show impl_deref
196+ snip show impl_deref
229197/Users/uriah/.config/nvim/snippets/rust/rust.json
230198[src/main.rs:484] & key = " impl_deref"
231199+-------------+-------------------------------------------------------------+
@@ -258,7 +226,7 @@ Note: This can be used to switch Configuration e.g. you wanna manage Python Snip
258226
259227` ` ` sh
260228# help
261- snipr config --help
229+ snip config --help
262230# Config Snippet
263- snipr config < path>
231+ snip config < path>
264232` ` `
0 commit comments