DEV Community

Cover image for ⚡10 Vim + VSCode tips that will supercharge your productivity

⚡10 Vim + VSCode tips that will supercharge your productivity

James Baldwin on January 15, 2020

Develop faster with these quick Vim + VSCode tips This post was originally posted on my personal blog at jwbaldwin.com When I started F...
Collapse
 
astamataris profile image
Andreas Stamataris

Great article James! I think the gifs help illustrate the value of some vim combinations like ci.

I also get the feeling that your usage of an IDE/editor/whatever is closer to mine so I wanted to ask.

1) What made you want to learn vim? Do you feel the appeal of not using a mouse?

Personally, having tried vim 3-4 times now (for more than a week each time), I don't see the appeal.
For example, you mentioned vim easy motion to move to an exact location.
2)Have you found that to be much quicker/efficient than a mouse? Or even better a track pad? Shall I give it another go with easy motion?

3) Do you refrain yourself from using VSCode commands like duplicating lines etc?

Thanks for your time 😃

Collapse
 
jw_baldwin profile image
James Baldwin • Edited

Thanks! Glad they helped, spent too long making them haha.

Hmm good questions:

1) Every couple of months I try to learn/do something that makes me faster and more productive, this time it was dedicating myself to vim. I do a lot of work on my laptop and had just spent a couple of months relearning how to touch type at about 80-90wpm and it seemed like the next frontier. Basically - I wanted to only type, every time my hand moved to my mouse I break my flow just a little bit.

I definitely am not a diehard Vim user. I don't think it's for everyone. However the obstacles I had in previous attempts were all addressed by a combination of: much better typing, VSCode environment (can't see myself using pure vim, it is way too useful and pleasing), plugins like easymotion, and the keybind jj (no joke).

2) I think I felt faster in about 4 days. I really forced myself to use it, I disconnected my mouse avoided the track-pad like the plague. The first couple days I spent configuring + googling every time something felt slow in vim. Now I'd say I'm about 1.5x faster than using a mouse or keypad! Easymotion is honestly amazing, I use the other vim motions too, but moving through files with it makes using a mouse feel clunky.

3) Nope! I like to combine the two, it's where I feel most productive. The VSCode commands I use the most are cmd + p, and cmd + d (duplicate cursor) which works with vim!

Reach out if you have any other questions, or if you give it another go I'd love to hear your progress!

Collapse
 
astamataris profile image
Andreas Stamataris

Thanks for answering my questions! 😁

I might try again but this time with easy-motion.

Personally I found vscode vim plugin quite laggy but I've had no issues with this extension marketplace.visualstudio.com/items...

Collapse
 
juliani profile image
Julian Iaquinandi

Great article :) I'm trying to force myself into the vim workflow for the 4th or 5th time XD

I've recently found the Neovim integration which exposes Neovim as service to be consumed inside of VSCode, no emulation!

Collapse
 
jw_baldwin profile image
James Baldwin • Edited

Thanks, I appreciate it :)

And good luck! It's totally worth it. That's about how many times I tried as well. Took time to fix and speed up my typing (another struggle, but worth it), and then just forced myself by working off my laptop (so at least no mouse).

Once I added a couple of the plugins and bindings I mention, I couldn't go back :)

I'll give it a look, I'd heard certain bindings are finicky - but I'm finding the same in the Vim extension too.

Collapse
 
pclundaahl profile image
Patrick Charles-Lundaahl

You're speaking my language!
The change-in-tag is definitely new to me - I'm going to give that a shot tomorrow! Motions are the number one reason I get grumpy without vim.

Collapse
 
jw_baldwin profile image
James Baldwin

Love it!! Right? Knowing tags were an object really helped me make the leap.

Totally agree, anytime I edit text I miss them.

Collapse
 
amaurybsouza profile image
Amaury Borges Souza

I using VSCode for YAML in Ansible, I thinked yo use another IDE but I VSCode é better than all.