0

Is this possible in Visual Studio Code, like in Atom and Sublime Text, where code snippets can be inserted by pressing the TAB key.

2 Answers 2

1

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.

Sign up to request clarification or add additional context in comments.

2 Comments

Works! Thank you!
"editor.tabCompletion": "on" or "off". it doesnt take true false
0

"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.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.