I’ve Made The Switch To Vim

July 15, 2017

I’ve officially made the switch from Sublime Text 3 to Vim. I did it partly for the hipster cred, and partly because I have an aversion to typing. If I could build software with out typing, I would do it. However, seeing as how that’s not feasible, Vim seemed like the next best option.

Before I switched I made a list of all the major commands I used in Sublime each day, and wrote down their Vim equivalents on a piece of paper, as a cheat-sheet. The first day I felt slow, but I don’t think I was. I think that feeling was my brain telling me that it didn’t like the change, and that it preferred the mindless repetitive keystrokes over modal editing.

Day two, however, that feeling had largely gone away. Either my brain had accepted it’s fate, or someone slipped something into breakfast, which was a blueberry smoothie and an egg, sausage, and bacon scramble with On The Border salsa, if you must know.

For my initial setup I followed (for the most part) Jeffery Way’s Vim course on Laracasts, so if you’re thinking about switching to Vim, that’s a good place to start. I believe you can start the course for free.

My .vimrc file if you’re interested.

Here are a list of plugins I use:

Vundle (a plugin manager)
Vim Vinegar - (better controls for the netrw file browser)
CtrlP - (file searching)
Surround - (to quickly surround text with tags, quotes, etc.)
Auto Pairs - (Autocompletes quotes, brackets, parentheses, and so on)
Multiple Cursors - (Allows you to select and edit multiple occurrences of some text)
PHP CS Fixer - (with a keystroke it formats your php files. It’s amazing.)
Vim Colors - (I can’t just look at an ugly screen all day)

I’m currently using Quantam color scheme.

Here are some of the key mappings I like (this list will grow over time):

In Sublime you can move your current line up and down. It’s a useful function. I use control j to to move the line down, and control k to move the line up.

nnoremap <C-j> :m .+1<CR>== "Moves current line one line down
nnoremap <C-k> :m .-2<CR>== "Moves current line one line up