How I use Vim for Web Development — Part 2 (Configuration)

We have already talked about the basic plugins I use on Vim, now let’s talk code!

First I remap the leader key to , , the leader key changes the meaning of every other key, with that you can add more shortcuts to your répertoire.

Then, I use this shortcut to remove evil trailing spaces:

I haven’t found a practical way to use search highlighting without getting annoyed 1 second after. That’s because when you search for something it keeps “searched”, if you know what I mean. To remove highlights I remap this command to ,/, it’s like magic.

To be honest, I’m not a big fan of splits (maybe because I have a really tiny monitor), but they can be very useful sometimes. But it’s a pain in the ass when it comes to moving around splits. I mean, why <C-W>?

This one allows me to fold (and unfold) a chunk of code by pressing the spacebar:

Some basic stuff I like:

Configs I use for Prettier (see part 1):

Aaaand configs for Python:

Well, it’s not much! (Right?)

I hope you can make use of it, and let me know if you have an awesome line in your .vimrc you think I should be using too!

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store