🐤 A Visual Studio Code extension for cheat.sh. Quickly and easily find code snippets for any language right inside your IDE.
MIT License
A Visual Studio Code extension for cht.sh. Watch this lightning talk to learn more.
openInNewEditor
: open snippets or in new editor window (default) in line with current document.verbose
: add comments around code snippets.baseUrl
: base url of the cheat server (see cheat.sh documentation)http.proxy
: VS Code proxy setting. If set, requests made by vscode-snippet will be sent through provided proxy (see Visual Studio Code network settings)defaultLanguage
: Programming language name in lower case to use as default language when there is no open editor window.title
: Template string of a snippet title. You can use the following variables:
insertWithDoubleClick
: insert snippet with double click.showCopySuccessNotification
: Whether to show a notification after the snippet is copied to the clipboard.saveBackups
: Whether to create backups of the snippets.Install this extension from the VSCode Marketplace
Snippet: Find
.Sometimes the first answer is not what you're looking for.
In that case, use Snippet: Show next answer
and Snippet: Show previous answer
to show alternative snippets.
Alternatively, you can also run the Snippet: Find Selected Text
from the
command menu:
You can configure a keyboard shortcut. By default this is ⌘ Command + ⇧ Shift + s:
You can move snippets or folders in the Snippets view by dragging and dropping them
Saved snippets are displayed in IntelliSense
vscode-snippet creates backups of your snippets when you delete, rename, move or save snippets. These backups are stored locally on your computer.
To restore a backup:
If you have VSCode settings sync enabled, you can restore snippets by using VSCode's built-in backup mechanisms: https://code.visualstudio.com/docs/editor/settings-sync#_restoring-data
VSCode stores snippets in the state.vscdb
file in a JSON
format.
To export the snippets:
state.vscdb
file
~/.config/Code/User/globalStorage/state.vscdb
AppData\Roaming\Code\User\globalStorage\state.vscdb
~/Library/Application Support/Code/User/globalStorage/state.vscdb
state.vscdb
file and run the following command:SELECT * FROM 'ItemTable' WHERE key like 'vscode-snippet.snippet'
2. Then click "Execute". You should get a single row with the key vscode-snippet.snippet
and a JSON
value. This JSON
contains all of your snippets.See CONTRIBUTING.md