DEV Community

Cover image for How to code faster - VS Code edition

How to code faster - VS Code edition

Thomas King on November 24, 2023

Pair programming can be very productive. But there's nothing so annoying as seeing your fellow programmer struggle with his coding. And with strugg...
Collapse
 
hassansuhaib profile image
Hassan Suhaib

This is actually useful. For selection, I have some further tips:

  • Use ctrl + shift + arrow keys to select a whole word or multiple words at one
  • Use shift + end while at the beginning of a line to select the whole line
  • Use shift + home when at the end of a line to select the whole line
  • Use ctrl + d to select multiple instances of a selection. The "f2" technique kinds works the same but with "ctrl + d" you have more control
Collapse
 
kinginit profile image
Thomas King

Thanks for your feedback!! I would say whatever works fastest for you. I end up using a combination of short keys together with a few fast mouse clicks. But your tips might help others as well!

Collapse
 
dedsyn4ps3 profile image
Ed Rutherford

Nicely Done!

One extremely convenient keyboard shortcut I use all the time in VSCode is an alternate of one you list above. Instead of moving a line up or down using alt+up/down, you can add the shift key to that button combination to actually duplicate the line.

Even better, if you're working with a React component that you'd like to duplicate quickly (like I do 😄), you can highlight the entire component and press alt+shift+down to paste a duplicate immediately below the selection!

Collapse
 
pavelee profile image
Paweł Ciosek

Thank you so much! 🙏❤️

Collapse
 
best_codes profile image
Best Codes

This is the most useful list of tips I have ever found for VS Code! Thank you so much for making this post, I knew about only maybe 2 of the things on the list. I especially love the Emmet, I will use that a lot. :)
RegEx will be useful too, and so will the ALT cursor thing — that one is really cool.

Again, thanks for your post, I think I will follow you now. :)

Collapse
 
officialphaqwasi profile image
Isaac Klutse

Very helpful

Collapse
 
brads profile image
Bradley Oliver

I can do anything with a keyboard I can do with a mouse... on windows specifically. Which is why I like it compared to other reasons I love the Mac or Linux environments. I am a power windows user and rarely reach for the mouse unless its for convenience (scrolling) but I was unaware of the RegEx in the Search and Replace and NimpleText is new - this is a good write up here! Good job!

Collapse
 
jeremiah_idakabor_8c8b556 profile image
Jeremiah Idakabor

Serious depth combining all these methods as constant habit.

I sure found couple minders to strap an extra pair of jet packs to my fast.

🎯Use Vs Code Refactoring capability- this I always forget. Not again.

🎯NimbleText- clearly handy for templating those particularly long forms.

Collapse
 
glntn101 profile image
Luke

Great tips, thank you!🙌

Collapse
 
alexanderop profile image
Alexander Opalic

awesome tips good written

Collapse
 
bijaydas profile image
Bijay Das

Instread of using the mouse try to operate your computer with your keyboard only. I understand there will be sometime where you must use mouse.

Learn touch typing. It has been game chager for me.

Collapse
 
joaotextor profile image
João Textor

This post is awesome.
Nimble Text is definitely a new tool for my arsenal. TYVM!!

Collapse
 
cimo88 profile image
Cicero

What a great article, man!! I tried these tips on my personal project this weekend and combined with an AI assistent I boosted my productivity to an incredible level.

Collapse
 
ngud0119 profile image
Ngu.D.@ce

Awesome article.

Collapse
 
yogini16 profile image
yogini16

This is helpful.
Thanks !!

Collapse
 
artxe2 profile image
Yeom suyun

There are some amazing tips.

Collapse
 
sephiga profile image
Sephiga

Super helpful and useful. Thanks!

Collapse
 
agaef5 profile image
Aga

I knew some of these already, but had no idea about mock-data generators, and been using chatGPT for that - with different results. Thank you :)

Collapse
 
smashcode profile image
smashcoder

Great tips, thanks for sharing

Collapse
 
syeo66 profile image
Red Ochsenbein (he/him)

...use vim motions...

Collapse
 
siriustl profile image
Sirius-TL

just use vim

Collapse
 
bop profile image
bop
  1. Uninstall VS Code
  2. Install Neovim
  3. Now you’re fast
Collapse
 
madukitech profile image
Maduki-tech

Keybindings feel weird when not using vim

Collapse
 
silverium profile image
Soldeplata Saketos

I also recommend using AI to generate code. I can recommend Github Copilot

Collapse
 
chandycraig profile image
Chandler Craig

Anyone have experience using Cursor? Wondering if it's better than just using VS Code with Copilot.