Reputation: 60
Is this possible in Visual Studio Code, like in Atom and Sublime Text, where code snippets can be inserted by pressing the TAB key.
Upvotes: 0
Views: 1159
Reputation: 1
"editor.tabCompletion": true <-- I often get long loading paused with the editor attempting to figure out what else I could want.
"editor.tabCompletion": onlySnippets
^ I prefer to keep my typing and tabbing to be reserved for my code snippets and instantly will insert my snippet without any lag ever.
Upvotes: 0
Reputation: 1210
Yes, it's possible. The language you are using needs to support it though.
The following help page explains both how to use them and how to create your own:
https://code.visualstudio.com/Docs/customization/userdefinedsnippets
There is a setting:
"editor.tabCompletion": true
That controls if the Tab key triggers an expansion, it's off by default I believe but you can change it from File -> Preferences -> Settings.
Upvotes: 1