JKirchartz

Web Yinzer

VIM quick-start, cheat-sheet, and links

If you’ve been following me for a while, you might know my editor of choice is VIM, it’s very clean. There’s nothing there to get in your way, except your own limitations, and those limitations can be destroyed through practice. Haven’t tried vim yet? What are you waiting for?

Vim is a text editor written by Bram Moolenaar and first released publicly in 1991. It is commonly found on unix-based operating systems. VIM is based off an older text editor, vi, and it’s name is an acronym for Vi-Improved. With vim Your fingers never have to leave the keyboard to command great power. The learning curve is a little steep but you can very quickly pick up new skills as you need them. The basic premise is that there is an Input mode and a Command mode. By default you start in command mode, here you can move around the document, search, and do a fair bit of editing quickly. Insert mode is designed for adding (and removing) text, it’s just like a normal text editor.

Quick Start/Cheat Sheet

Vim commands are more of a language than a list of commands you need to use.

From the Command Line

Working with VIM modes

note: ‘i’ doesn’t mean “enter insert mode” so much as it is a command to “insert the following text until you hit ESC" Also, "command mode" is often referred to as "normal mode," because for a lot of tasks, you will probably want to use a bunch of commands, instead of writing a bunch of stuff in input mode.

VIM Command/Normal-mode

VIM Input-mode

I’m not sure how useful these are in gvim, but these should work if you’re running in a terminal.

VIM tips

Going Further

Vim is highly customizable, you can set shortcuts and preferences in the .vimrc file, usually located in your home directory. There are a ton of plugins (aka scripts) available too. They’re easy to manage with other scripts like Pathogen, Vundle, or vim-plug. I just switch from vundle to vim-plug because it makes it easier to configure your plugins and does it a lot faster.

If you want to get a headstart, my dotfiles are available on github, but there are a lot of people doing that lately, so look around. Also there’s a few very nice VIM Distributions like Janus, SPF13-vim, and dotvim that have a lot of plugins and a nice vimrc right out of the box, definitely worth a look.

:godmode: