VSCode IDE Advanced Custom Snippets | Boost your productivity with Visual Studio Code

preview_player
Показать описание
I made a video that goes a bit deeper into VSCode snippets and shows you a few nice tricks you can do with them, with clear examples. If you've wanted to be a faster coder, watch this video now. Invest 10 minutes of your time, and learn how to do more work with fewer key presses.

If you haven't watched the previous parts of my productivity videos, it's a good idea to go watch them now:

As always, if you enjoy this video, click the like-button, drop some feedback, and share the link with anyone who should see this.

Timecodes:
0:00 - Why VSCode snippets are good for you?
1:19 - Tabstops and placeholders
3:38 - Choice lists in snippets
5:18 - Snippet variables, how to use
8:08 - Keyboard shortcuts to snippets

Links in the video:
Рекомендации по теме
Комментарии
Автор

Amazing video and a brilliant explanation 👏. Greetings from Chile.

Promedio
Автор

Cools tricks. One thing you can do is, instead of using the snippet itself as an argument for the shortcut, use the name of the snippet that is defined in the snippets json file:
{
"key": "alt+t",
"command": "editor.action.insertSnippet",
"when": "editorHasSelection",
"args": {
"name": "WrapText",
}
},

caballeroRS
Автор

Any idea how to use global or project or environmental variables in snippets? Let's say I have a project that use textdomain XXX for translations and I would like to write snippets for functions like __() or _e() or esc_html(), etc... and they need a second argument to be automatically that XXX, so in next project I can easily change it in a single place and not in every single snippet again and again

JakubNovak
Автор

Suggestion: how to run a task from a shortcut. Thanks

caballeroRS
Автор

please could you write a php snippet of the code

$this->name1="name2";

in Visual studio code and also

$this->name1=name2;

messphp
visit shbcf.ru