Alright, these are my fave go-to features in VSCode - share yours in the comments below! :)
For Windows / Linux folk, switch Cmd for Ctrl as you see them.
1. Sometimes you need to launch VSCode from your terminal. Hit Cmd + Shift + P and type ‘PATH’. Hit enter, and when it’s done installing you can go to a folder, type ‘code’ and it’ll launch VSCode.
2. I hate retyping the same stuff repeatedly. Go to Preferences, User Snippets, pick a language (like JavaScript or whatever), fill out the template and BOOM! When you’re editing you can type the shortcut, hit enter, done!
3. You can build your project directly in VSCode. In your package.json make a task called “build” and have it do whatever you need, like run Rollup or Webpack. Now hit Cmd + Shift + B, choose the build task, and you're good to go!
4. This works okay in JavaScript, but it's better in TypeScript. Pick a function or variable and hit F2 or Cmd + Shift + P and go for ‘Rename Symbol’. Bam! renames it everywhere!
5. If you’re working with TypeScript and want to hide the generated JavaScript, go to Preferences, Settings, then Open settings.json, pop the line below in files.exclude:
"**/*.js": { "when": "$(basename).ts" }
and it’ll take care of it for you. (Thanks to @jhanssens and others besides for that one!)
6. Finally, some keyboard shortcuts for ya:
Cmd + Shift + K to delete a line
Cmd + / to comment a line out
Alt + up/down arrow to move (add Shiff to copy the line)
Whoop! Go productivity!
Meanwhile the clock can be found at https://www.amazon.co.uk/dp/B0090H391...
Music & SFX are from Epidemic Sound: https://www.epidemicsound.com/