Increase coding productivity with VSCode + Vim

Narongsak Keawmanee
Medvine Tech
Published in
3 min readJan 12, 2019
VSCodeVim

I heard my friend talking about vim at middle of last year. at that time I just listen and not give a try. but in last month I just started integration vim plugin call VSCodeVim with VSCode.

Why shoud I use vim?

The most benefit that I heard about it instead of you moving curror in plugin with arrow key you can move with h, j, k , l. that make you hand stick at keyboard all the time. don’t waste you time to switch hand to arrow key, trackpad or mouse. you can search text and goto specific word on that line. or jump to line you want. or just copy with V key and that select range you want. and I will show how powerful it is in.

Use h j k l for moving cursor. instead of arrow key.

use h for go left.
use j for go down (j look like down arrow).
use k for go up.
use l for go right.

use h, j, k, l for move cursor.

Go to specifics line

Vim introduce feature that will leading you to line you want. just type <line> follow with G it will lead you to that line. for this example I will go to line 5, 10, 15, 20, 27 very fast.

use <line>G will move cursor to specific line pretty fast

Go to specifics character in that line.

While I coding, sometime need to go to specifics word on that line for start adding more code. normally I use option key and arrow to move. but for vim. we have w to move. this will be same behavior line option key. but I love to search text in that line by using F<Char> for search. it will lead me to the word start with <Char> that I type.

search char with f<char>, here I use fv, fw, fw, f, and f1

Copy and paste “single line”

For copy and paste code in select line. use yy for copy and p for paste

use yy and p for copy single line and paste

Copy and paste “multiple line”

For copy and paste multiple. use V to enter “visual mode” then select line with j and use Y for copy and p for paste

use V to select line and copy with Y and past with P

Delete one line

When need to delete single line. it easy just use dd for delete. that’s it.

delete one line with dd

Conclusion.

Vim have a lot of command that lead me to move cursor around. split screen. find word and replace and more. it will increase you productivity and make me write code more enjoy. my advice is. give it a try with open mind. you will find new world.

I appreciated all cup of coffee. you can donate coffee at button below.

https://www.buymeacoffee.com/klogic

--

--

Narongsak Keawmanee
Medvine Tech

Software Engineer at Refinitiv • Highly ambitious • Love working with great people • Never Stop Learning