Posted 1969-12-31 with tags Vim, Reference, cheatsheet

Core Functionality (Vocabulary)

  • C delete current line (after current cursor position) and enter insert mode
  • D delete current line (after current cursor position)
  • dd delete current line
  • ciw *deleting the current word*
  • cit *deleting between the current html tag*
  • ci) *deleting between the ()*
  • With surround plugin:
  • ds' *deleting the surrounding '*
  • cs'" *changing the surrounding ' for "s*
  • / *incremental search*
  • o/O inserting new lines.
  • 1) Cursor movement commands (hjkl)
  • 2) Move by word (w and b) and page (^f and ^b)
  • 3) Search for word under cursor (forward * and backward #)
  • 4) File commands (:w, :new)
  • 5) Split buffer (:split) and buffer movement (^w and hjkl)
  • 6) Tab commands (:tabnext, :tabnext etc, bound to ",tn", ",n", ",p" etc)
  • 7) File explorer (:Explore(), bound to ,f)
  • 8) Move to start and end of file (gg and G)
  • 9) Switch modes (v, V for linewise, i, esc)
  • 10) Basic register operations (dd, y, p, P)
  • C - delete until end of line and enter insert mode.
  • > i B - increase indentation of current block


Great in depth answer about registers:

Leader Key(s)

A great explanation of leader keys:



ALE - Asynchronous Lint Engine

Seems like it requires VIM 8.0 or greater at this point; so install vim from source or use this PPA which seems semi-legit:


Currently using but should look into using ALE instead as neomake seems a bit buggy in my experience.


See here for good info on how to generate tags:; it sounds like the original ctags program is abandoned, so it's best to use or possibly (obviously if you only need PHP tags). Seems like universal-ctags is a fairly active project so it seems like a good option.


Available as a snap for linux:, though there are some caveats due to security restrictions, including the inability to generate tags for projects outside of the user's home directory.

Compiling from source (instructions) instead, since there isn't a good PPA or ubuntu package:

git clone
cd ctags
sudo make install
Tips on MacOS

brew install ctags


Automatically regenerate tag files with



Useful to install supertab which maps tab to the control-x + control-o hotkey that triggers omnicomplete, in a way that is compatible with snippets. Good article here on setup:


Maybe a better version of phpcomplete:

Enhanced Statusline Options


lightline seems like a good option.

lightline color schemes:

surround.vim Plugin


  1. yss: add surrounding character(s) to current line


Vim wrapper for UNIX shell commands:

  • :Delete: Delete a buffer and the file on disk simultaneously.
  • :Unlink: Like :Delete, but keeps the now empty buffer.
  • :Move: Rename a buffer and the file on disk simultaneously.
  • :Rename: Like :Move, but relative to the current file's containing directory.
  • :Chmod: Change the permissions of the current file.
  • :Mkdir: Create a directory, defaulting to the parent of the current file.
  • :Cfind: Run find and load the results into the quickfix list.
  • :Clocate: Run locate and load the results into the quickfix list.
  • :Lfind/:Llocate: Like above, but use the location list.
  • :Wall: Write every open window
  • :SudoWrite: Write a privileged file with sudo.
  • :SudoEdit: Edit a privileged file with sudo.
  • File type detection for sudo -e is based on original file name.
  • New files created with a shebang line are automatically made executable.


  • [](" target="_blank">

Misc. Resources

  5. good simple cheatsheet:
  6. attempt at a graphical cheatsheet:
  7. attempt at a graphical cheatsheet:
  8. a good text cheatsheet: and advanced:
  9. An interesting "out-of-the-box" vim setup including some common plugins and features (looks a bit neglected / out of date):