DEV Community

Pro tips for Visual Studio Code to be productive in 2018 👨🏻‍💻

Ankur Biswas on December 20, 2018

Over the last few years, Visual Studio Code has grown very popular over the open-source IDE market. VS Code was publicly released in 2015 and now...
Collapse
 
dance2die profile image
Sung M. Kim

Edit Multiple Lines at Once is what blew me away 😮 when I saw Wes Bos editing multiple lines of React components at once in VS Code .

And this time you blew me away at JSON to Code 🕺.

Collapse
 
nickjj profile image
Nick Janetakis • Edited

You can take the multiple lines tip one step further and jump to the beginning or end of each line with a hotkey too (very handy for CSV files).

Here's a demo I recorded a few months ago: youtube.com/watch?v=_u-Uuw3GhCQ

Collapse
 
dance2die profile image
Sung M. Kim

That video makes you feel like editing texts using your thoughts almost 😲

Collapse
 
iankurbiswas profile image
Ankur Biswas

Thanks for sharing this video. This is really a pro tip of how we could use multiple line editing.

Collapse
 
jyarnell profile image
James Yarnell

Agree about multiple lines. I always use Ctrl/Cmd + D after selecting text to change multiple instances but this will be nice.

Collapse
 
maciek134 profile image
Maciej Sopyło

You guys do realize that multiline editing has been a feature of pretty much any IDE for at least 7-8 years, right? I like VSCode but let's not make it look like they made some breakthrough with this.

Thread Thread
 
mykeg profile image
MyKeg

Came here to say that too. My muscle memory prefers the way Visual Studio and Notepad++ has done it for years. Put the caret at a place on the line, and hold ALT-SHIFT and press UP or DOWN, and that will put the caret insertion/deletion point on multiple lines. Then type or delete or do whatever to do it on each of the lines. But in VS Code, it duplicates lines - same key commands, but completely different result. :(

Collapse
 
iankurbiswas profile image
Ankur Biswas

Glad you liked it 🙂

Collapse
 
kjmitch profile image
Kyle Mitchell

It would have been good to update this post, or at least change it to read '2019', before reposting it so late in 2018. (I thought it was a typo until I saw the original Medium post was made in August.)

It's important to note, the Command Palette is opened by default with Ctrl/Cmd + Shift + P. The chord Ctrl/Cmd + P will bring up a "Quick Open" input in the same location, but most of what I need there I can do in the Command Palette without using prefix characters. Of course, any of these bindings can be looked up and changed from the Keyboard Shortcuts preferences page, reachable with Ctrl/Cmd + K Ctrl/Cmd + S.

Collapse
 
prameshbajra profile image
Pramesh Bajracharya

That Live Share is what I really would love to try.

Collapse
 
iankurbiswas profile image
Ankur Biswas

Glad could help 😊

Collapse
 
rafalpienkowski profile image
Rafal Pienkowski

FYI you could have a Live Share session across VS Code and VS professional/enterprise as well. It’s also working cross-OS (Windows/Linux) :)

Collapse
 
prameshbajra profile image
Pramesh Bajracharya

Awesome. Thanks for the info.

Collapse
 
ickas profile image
Henrique Macedo

One thing we can't forget is the Prettier plugin. We just need to focus on writing code, save, and buumm... code is formatted. It's magic!

Collapse
 
iankurbiswas profile image
Ankur Biswas • Edited

Thanks for sharing your opinion. Prettier does make our job easier when it comes to code indentation. But you've to remember that, Prettier doesn't support languages like Python, Ruby, Swift, PHP, Java. They're currently working on these languages.

Collapse
 
emmabostian profile image
Emma Bostian ✨

Great article! And very useful considering the popularity of VSCode :)

Collapse
 
iankurbiswas profile image
Ankur Biswas

Glad you liked it 😁

Collapse
 
geshan profile image
Geshan Manandhar

Did you mean 2019 and not 2018 :)

Collapse
 
iankurbiswas profile image
Ankur Biswas

I guess what I meant was, from 2018 onwards 😋😜

Collapse
 
bolah2009 profile image
Buari Bola Ahmed

Nice one... Helpful article.

Collapse
 
iankurbiswas profile image
Ankur Biswas

Glad you liked it 😁

Collapse
 
bardware profile image
Bernhard Döbler • Edited

Does Go to Definition work for any language?

Collapse
 
iankurbiswas profile image
Ankur Biswas

Yes 👍🏻