Difference between revisions of "HowToUseVim"
Jason Parmer (talk | contribs) |
Jason Parmer (talk | contribs) |
||
| Line 39: | Line 39: | ||
* Vertical Insert | * Vertical Insert | ||
* plugins / links / documentation | * plugins / links / documentation | ||
| + | |||
| + | [[Category:ToolHowTo]] | ||
Revision as of 07:38, 21 June 2007
This is just a start, hopefully this will get you on your way to being a vim power user
Contents
Why vim?
It works well in screen and is reasonably powerful programmer's editor.
Modal Editing
Vim is a modal editor, meaning that unless you are in insert mode characters you type will not show up in the input buffer. I cannot stress enough that unless you are actually typing something in, you should be in command mode. This is very non intuitive for beginners.
If you get stuck, jamming on the
Commands that start with : need to be finished by hitting
Quitting Vim
- :q - quit vim
File Operations
- :w - saves the file
- :wq - saves the file and quits vim
- :e
- edit filename - :e . - open a file browser
Command Mode
command mode is the default mode for vim.
- i - insert
- lets you type into the buffer. hit
when done to return to command mode
- lets you type into the buffer. hit
- u - undo
- will undo any commands. The undo buffer goes back to when you started your editing session and is really good, so it is better to stay in the habit of having an editor open for a long time and use ctrl-z and the fg command to drop to a shell
- ctrl-r - redo
- redoes something that has been undone
- ct
- change till - replace the text from here to the character with what you type. Puts you in insert mode
- cw - Change Word
Insert Mode
This is the mode you are in when you use the insert or change commands.
ToDo
- Document copy / paste / selections
- Vertical Insert
- plugins / links / documentation
