-
Notifications
You must be signed in to change notification settings - Fork 39
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.
- From the letter 'a'.
Save and Exit
- Enter command mode using Esc. If you're already in command mode, there's no harm but also no need to hit Esc.
- SHIFT + Z and hit Z a second time
Cut a single line
- Go into command mode by hitting the escape key.
- Hit 'd' twice.
Paste
- If you're not already in command mode, hit Esc.
- Hit 'p'