Skip to content

Basic VIM commands

Josh Greig edited this page Mar 12, 2017 · 3 revisions

VIM is the console-based text editor you see by default in Windows when you use commands like 'git rebase -i master'. vim is a lot to get used to but luckily there's only a few keyboard shortcuts needed to get most of our work done on AccessLocator.

Command Mode

For some keyboard shortcuts to work, you'll need to be in command mode.

  • Hit the escape key.

Editing Mode

Editing mode lets you type text using the keyboard like you would in Word or any other application. When vim initially loads, though, it is in command mode.

  1. From the letter 'a'.

Save and Exit

  1. Enter command mode using Esc. If you're already in command mode, there's no harm but also no need to hit Esc.
  2. SHIFT + Z and hit Z a second time

Cut a single line

  1. Go into command mode by hitting the escape key.
  2. Hit 'd' twice.

Paste

  1. If you're not already in command mode, hit Esc.
  2. Hit 'p'
Clone this wiki locally