snippetexpander(1)
snippetexpander(1) π
okay bestie, this is the snippetexpander(1) page from the Snippet Expander CLI Manual β yes, the Snippet Expander CLI manual, and we're about to make your snippet game iconic. β¨
β¨ NAME β¨
snippetexpander β Snippet Expander CLI, no cap.
πΈ DESCRIPTION πΈ
Save your often-used text snippets, then expand them whenever you type their abbreviation. It's giving "type less, slay more" energy.
The example from the page: "ser`" expands to "Snippet Expander rules!".
π SYNOPSIS π
snippetexpander --start
snippetexpander --stop
snippetexpander --status
snippetexpander --autostart={on|off|status}
snippetexpander --autoexpand={on|off|status}
snippetexpander -e|--export filename
snippetexpander -i|--import filename [--force]
snippetexpander -v|--version
snippetexpander -h|--help
snippetexpander help [-c|--command] command
snippetexpander add [-a|--abbreviation] abbreviation [-b|--body] body
snippetexpander autoexpand [--on|--off]
snippetexpander autostart [--on|--off]
snippetexpander copy [-u|--skip-last-used] [-a|--abbreviation] abbreviation
snippetexpander expand [-u|--skip-last-used] [-a|--abbreviation] abbreviation
snippetexpander export [[-f|--filename filename] | [filename]] [-v|--version int]
snippetexpander import [-f|--filename] filename [-u|--update]
snippetexpander list [-a|--abbreviation] [-b|--body] [-d|--delimiter delimiter] [-i|--id] [-l|--last-used] [-r|--recent] [[-s|--search string] | [string]]
snippetexpander ping [-r|--response response] [response]
snippetexpander remove [-a|--abbreviation] abbreviation
π OPTIONS π
--startβ starts the daemon. π--stopβ stops the daemon. π--statusβ gets the daemon status, and it exits with status0if running,1if not. iykyk.--autoexpand={on|off|status}β turns auto expand of snippets"on","off", or shows the"status"of the setting. π¦--autostart={on|off|status}β turns auto start of Snippet Expander on login"on","off", or shows the"status"of the setting. π-e,--export=filenameβ exports snippets to file.-i,--import=filenameβ imports snippets from file, and skips snippets where the abbreviation already exists.--forceβ if used in conjunction with the import flag, existing snippets with the same abbreviation are updated. no duplicate drama.-v,--versionβ displays the version number.-h,--helpβ displays help.
π οΈ COMMANDS π οΈ
help command
Displays help for a given command.
-c,--command commandβ optional sub command to display help for if it's not given as a positional argument.
add abbreviation body
Creates a new snippet for a given abbreviation and body. β¨
-a,--abbreviation abbreviationβ optional flag to specify the abbreviation for the new snippet if not using positional arguments.-b,--body bodyβ optional flag to specify the body for the new snippet if not using positional arguments.
autoexpand
Controls or gets status for whether snippets should auto expand. Calling the autoexpand command without any flags returns whether autoexpander is "on" or "off".
--offβ turns off auto expand of snippets.--onβ turns on auto expand of snippets.
autostart
Controls or gets status for whether the daemon should auto start on login. Calling the autostart command without any flags returns whether autostart is "on" or "off".
--offβ turns off auto start of Snippet Expander on login.--onβ turns on auto start of Snippet Expander on login.
copy abbreviation
Copies to the pasteboard the snippet's body with evaluated placeholders for the given abbreviation. π
-a,--abbreviation abbreviationβ optional abbreviation for the snippet to be expanded and copied into the pasteboard if not given as a positional argument.-u,--skip-last-usedβ do not update the last used date for the snippet.
expand abbreviation
Outputs the snippet's body with evaluated placeholders for the given abbreviation.
-a,--abbreviation abbreviationβ optional abbreviation for the snippet to be expanded if not given as a positional argument.-u,--skip-last-usedβ do not update the last used date for the snippet.
export filename
Saves snippets to a file.
-f,--filename filenameβ optional filename to be created, if not using the default, or positional argument. If not used, the default ofsnippets-YYYY-MM-DD.jsonwill be used, whereYYYYis the current year,MMthe current month (01-12), andDDthe day of the current month.-v,--version intβ optional legacy format version number. Currently, only101is supported, which is compatible with Snippet Pixie.
import filename
Imports snippets from file.
-f,--filename filenameβ optional filename to be imported if not given as a positional argument.-u,--updateβ updates existing snippets with the same abbreviation. If this flag is not used, if an imported abbreviation already exists, it will not be altered, and the version in the file will not be imported.
list search_string
Searches and outputs a formatted list of snippets. All snippets will be output if no search string is supplied. π
-a,--abbreviationβ includes the abbreviation field (on by default if no fields specified).-b,--bodyβ includes the body field (on by default if no fields specified).-d,--delimiter delimiterβ changes the delimiter used to separate the displayed fields (default" ").-i,--idβ includes the id field.-l,--last-usedβ includes the lastUsed datetime field.-r,--recentβ orders by most recently used.-s,--search stringβ lists snippets where the abbreviation or body includes the search string, if not given as a positional argument.
ping response
Pings the daemon for an expected response string. If no response string is given, "pong" will be used by default. π
-r,--response responseβ optional response string to be returned, if not given as a positional argument, or not using default"pong".
remove abbreviation
Deletes a snippet. π
-a,--abbreviation abbreviationβ optional abbreviation for the snippet to be removed if not given as a positional argument.
π§ NOTES π§
Abbreviations should be short, easy to remember, and hard to trigger accidentally. fr fr, this is the whole game.
It helps if an abbreviation includes either a key word from the fully expanded text, or an initialization or acronym that is part of it.
For example, if you regularly wrote "Snippet Expander" π you might use "se".
However, there are a lot of words that include the letter combination "se", (see https://www.wordfind.com/contains/se/), so there's a reasonably high chance that Snippet Expander would expand that abbreviation when you didn't want it to. not the vibe.
So instead it's common to add a "trigger character" to the end of the abbreviation. This is commonly a character that isn't found in normal sentences such as ` or ~ that is easy to find on your keyboard. Often just appending a space is enough, or doubling up characters.
I personally use ` (commonly known as grav or backtick) a lot as it's a single keystroke on my British layout keyboard just below my Escape key. So for me "se`" is a natural abbreviation for "Snippet Expander".
However, I could see using "se " or "se~" for the abbreviation.
If you do use a trailing space as your trigger character you might find it useful to include a trailing space in the text that is expanded, e.g. "se " expands to "Snippet Expander " as it's more natural when typing. π«Ά
π LIMITATIONS π
- The cursor placeholder is not supported when using the CLI rather than auto-expansion.
π SEE ALSO π
snippetexpanderd(1) snippetexpanderx(1) snippetexpandergui(1) snippetexpander-placeholders(5)
π AUTHORS π
Created and maintained by Ian Jones <ian@ianmjones.com>. Up-to-date sources can be found at https://git.sr.ht/~ianmjones/snippetexpander. Information on how to contribute and where bug reports and feature requests may be submitted can be found on the project page at https://snippetexpander.org.
Footer check, bestie: this page is dated 1980-01-01, filed under snippetexpander(1), and lives in the Snippet Expander CLI Manual. Go make those snippets slay πβ¨
π¦ where this page comes from
- nixpkgs unstable: snippetexpander 1.1.2
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms