DEV Community

Cover image for VIM & Visual Studio Code Tips & Tricks (With Video / GIF)

VIM & Visual Studio Code Tips & Tricks (With Video / GIF)

Muhammad Muhajir on June 30, 2019

This post is going to be a collection of VIM And Visual Studio Code tips that I use daily. And it will be updated frequently. So stay tuned. You ca...
Collapse
 
_sinharakshit_ profile image
Rakshit Sinha ⚡ •

Inspired by your 3rd tip, when inside an HTML/JSX tag:
Using cs<div> can change your current tag to a <div> tag. Of course, that is applicable to all other types of HTML tags out there. <div> was just for an example.

Collapse
 
muhajirdev profile image
Muhammad Muhajir •

Cool

Collapse
 
stuartaylward profile image
stuartaylward •

Did I miss something? How does this work? Is there a shortcut key combination to make this work?

Collapse
 
muhajirdev profile image
Muhammad Muhajir •

Hi stuart,
Did you manage to get it working?

First of all you need to install github.com/VSCodeVim/Vim . And you can learn some vim basic here openvim.com .

After that, all those tips & tricks should be usable

Collapse
 
z2lai profile image
z2lai •

Yeah, I'm feeling quite confused and stupid right now...

Collapse
 
muhajirdev profile image
Muhammad Muhajir • • Edited

Ah, my bad. Should have said that we're using VSCode Vim extension. I'll update the post. Thanks for noticing

Collapse
 
muhajirdev profile image
Muhammad Muhajir •

Yeah. We're using VSCode VIM extension like mentioned by @firozansari . I'll update the post. Thanks for noticing

Collapse
 
gypsydave5 profile image
David Wickes •

Worth pointing out that cs relies on (vim-surround)[github.com/tpope/vim-surround] in actual Vim.

Collapse
 
muhajirdev profile image
Muhammad Muhajir •

Yeah, it's awesome. Thanks for adding the information David :)

Collapse
 
agracy2246 profile image
Adam Gracy •

Here is more evidence bad things come in threes.

Collapse
 
muhajirdev profile image
Muhammad Muhajir •

😂😂

Collapse
 
firozansari profile image
Firoz Ansari •

I am not sure but look like you are using VS Code Vim Extension.

Collapse
 
muhajirdev profile image
Muhammad Muhajir •

Right I am using that extension

Collapse
 
muhajirdev profile image
Muhammad Muhajir •

Update

I have launched vscode.xyz for this purpose. Check it out

Collapse
 
dr1verrr profile image
Danylo •

Oh why I didn't see this article before. Always used auto rename tag ext cuz have no alternatives