block by roachhd df8339a6932c905c9d15

vim Cheatsheet

Vim Cheat Sheet

Movement

By “Word”

Searching

On current line

In document

Combining with other commands

By page/screen

Positioning within a page/screen

Positioning within a document/file

Marks

Editing

Copy/Cut & Paste

See http://vim.wikia.com/wiki/VimTip386 for more detailed info.

  1. press v (for visual mode) to start the selection (or V to select whole lines, or Ctrl-v for a vertical block)
  2. move the cursor to where you want the selection to end
  3. press d for delete (cut) or y for yank (copy)
  4. position the cursor where you want to paste
  5. press P or p for paste before or after cursor, respectively

Buffers

For an excellent tutorial, see http://reefpoints.dockyard.com/2013/10/22/vim-buffers.html

Windows

For another excellent tutorial, see http://reefpoints.dockyard.com/2013/11/27/vim-windows.html