1- # CLI Tool for Managing Neovim and VSCode Snippets
1+ # A CLI (snipr) Tool for Managing Neovim and VSCode Snippets
22
3- [ ![ Rust Build and Test] ( https://github.com/codeitlikemiley/snip /actions/workflows/test.yml/badge.svg )] ( https://github.com/codeitlikemiley/snip /actions/workflows/test.yml )
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 )
44
5- [ ![ release] ( https://github.com/codeitlikemiley/snip /actions/workflows/release.yml/badge.svg )] ( https://github.com/codeitlikemiley/snip /actions/workflows/release.yml )
5+ [ ![ release] ( https://github.com/codeitlikemiley/snipr /actions/workflows/release.yml/badge.svg )] ( https://github.com/codeitlikemiley/snipr /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 [ snip ] ( https://github.com/codeitlikemiley/snip /releases ) on Releases Page
13+ 1 . You can Download and Install [ snipr ] ( https://github.com/codeitlikemiley/snipr /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
19+
20+ ``` sh
21+ cargo install snipr
22+ ```
23+
24+
25+
18262 . Build it from source
1927### Clone
2028``` sh
21- git clone htps://github.com/codeitlikemiley/snip .git
22- cd snip
29+ git clone htps://github.com/codeitlikemiley/snipr .git
30+ cd snipr
2331```
2432
2533### For MacOS
@@ -30,24 +38,24 @@ cd snip
3038### For Linux
3139``` sh
3240cargo build --release
33- mv ./target/release/snip /usr/local/bin/snip
34- chmod +x /usr/local/bin/snip
41+ mv ./target/release/snipr /usr/local/bin/snipr
42+ chmod +x /usr/local/bin/snipr
3543```
3644
3745### For Windows
3846``` sh
3947cargo build --release
4048
4149# Replace 'YourUsername' with your actual username
42- Move-Item .\t arget\r elease\s nip .exe C:\U sers\Y ourUsername\b in\s nip .exe
50+ Move-Item .\t arget\r elease\s nipr .exe C:\U sers\Y ourUsername\b in\s nipr .exe
4351
4452# Again, replace 'YourUsername' with your actual username
4553$env :Path += " ;C:\Users\YourUsername\bin"
4654```
4755
4856## Managing Multiple Snippets File for Different Languages
4957
50- You can use the command ` snip config <path>` to change the Snippets File on Runtime.
58+ You can use the command ` snipr config <path>` to change the Snippets File on Runtime.
5159
5260Note: This is quite useful when you want to manage different Snippets File for different languages.
5361
@@ -61,20 +69,20 @@ but you can change it by setting the `SNIP_CONFIG_PATH` environment variable.
61691 . Help
6270
6371``` sh
64- snip
72+ snipr
6573# or
66- snip --help
74+ snipr --help
6775```
6876
6977<details >
7078<summary >Output</summary >
7179
7280``` sh
73- snip
81+ snipr
7482/Users/uriah/.config/nvim/snippets/rust/rust.json
7583A CLI tool for managing Neovim LuaSnip Rust snippets
7684
77- Usage: snip < COMMAND>
85+ Usage: snipr < COMMAND>
7886
7987Commands:
8088 add Adds entry to Snippet Collection file
@@ -96,38 +104,38 @@ Options:
961042. Add new snippet
97105` ` ` sh
98106# help
99- snip add --help
107+ snipr add --help
100108# Add Snippet
101- snip add --key < key> --value < value> --description < description> -- " <snippet>"
109+ snipr add --key < key> --value < value> --description < description> -- " <snippet>"
102110` ` `
103111
1041123. Remove snippet
105113
106114` ` ` sh
107115# help
108- snip remove --help
116+ snipr remove --help
109117# Remove Snippet
110- snip remove --key < key>
118+ snipr remove --key < key>
111119` ` `
112120
1131214. List all snippets
114122
115123` ` ` sh
116124# help
117- snip ls --help
125+ snipr ls --help
118126# Usage
119- snip ls < LIST_OPTION | (key or prefix)>
127+ snipr ls < LIST_OPTION | (key or prefix)>
120128# List all Keys
121- snip ls key
129+ snipr ls key
122130# List all Prefixes
123- snip ls prefix
131+ snipr ls prefix
124132` ` `
125133
126134< details>
127135< summary> Output< /summary>
128136
129137` ` ` sh
130- snip ls key
138+ snipr ls key
131139/Users/uriah/.config/nvim/snippets/rust/rust.json
132140[src/main.rs:468] list_option = Key
133141impl_iterator
@@ -148,16 +156,16 @@ impl_clone_single_field
148156
149157` ` ` sh
150158# help
151- snip update-key --help
159+ snipr update-key --help
152160# Update Key
153- snip update-key --old-key < old-key> --new-key < new-key>
161+ snipr update-key --old-key < old-key> --new-key < new-key>
154162` ` `
155163
156164< details>
157165< summary> Output< /summary>
158166
159167` ` ` sh
160- snip update-key --old-key " Fuzz match String" --new-key " fuzzy-match-string"
168+ snipr update-key --old-key " Fuzz match String" --new-key " fuzzy-match-string"
161169/Users/uriah/.config/nvim/snippets/rust/rust.json
162170[src/main.rs:499] & old_key = " Fuzz match String"
163171[src/main.rs:499] & new_key = " fuzzy-match-string"
@@ -169,25 +177,25 @@ snip update-key --old-key "Fuzz match String" --new-key "fuzzy-match-string"
169177
170178` ` ` sh
171179# help
172- snip edit --help
173- # Update Snippet Value
174- snip edit --key < key> --prefix < prefix> --description < description> -- " <snippet>"
180+ snipr edit --help
181+ # Update snippet Value
182+ snipr edit --key < key> --prefix < prefix> --description < description> -- " <snippet>"
175183` ` `
176184
1771857. Search Snippet
178186
179187` ` ` sh
180188# help
181- snip search --help
189+ snipr search --help
182190# Search Snippet
183- snip search < ID | (key or prefix)> -- " <search_term>"
191+ snipr search < ID | (key or prefix)> -- " <search_term>"
184192` ` `
185193
186194< details>
187195< summary> Output< /summary>
188196
189197` ` ` sh
190- snip search key -- impl
198+ snipr search key -- impl
191199/Users/uriah/.config/nvim/snippets/rust/rust.json
192200[src/main.rs:490] id = Some(
193201 Key,
@@ -208,16 +216,16 @@ impl_partialeq_single_field
208216
209217` ` ` sh
210218# help
211- snip show --help
219+ snipr show --help
212220# Show Snippet
213- snip show < key_id>
221+ snipr show < key_id>
214222` ` `
215223
216224< details>
217225< summary> Output< /summary>
218226
219227` ` ` sh
220- snip show impl_deref
228+ snipr show impl_deref
221229/Users/uriah/.config/nvim/snippets/rust/rust.json
222230[src/main.rs:484] & key = " impl_deref"
223231+-------------+-------------------------------------------------------------+
@@ -250,7 +258,7 @@ Note: This can be used to switch Configuration e.g. you wanna manage Python Snip
250258
251259` ` ` sh
252260# help
253- snip config --help
261+ snipr config --help
254262# Config Snippet
255- snip config < path>
263+ snipr config < path>
256264` ` `
0 commit comments