-
Notifications
You must be signed in to change notification settings - Fork 22
How to use Vim
Sven Nilsen edited this page Feb 1, 2014
·
4 revisions
Vim is a text editor that can be used in the terminal window.
It starts in a read-only mode.
When you enter a edit mode you can go back using Esc.
/<text> Search for text.
:!<command> Execute terminal command.
:set ts=4 Set tabs to 4.
:set expandtab Convert tabs to spaces.
:w Save file.
:q Quit.
i Edit text.
gg Jump to first line.
Shift+g Jump to last line.
u Undo.
Ctrl+r Redo.
p Paste copied text.
v Select text.
d Cut selected text.
y Copy selected text.
Shift+v Same as when selecting text, but whole lines.
The clipboard in Vim is separated from the window clipboard.
Use the right-click menu to copy or paste from the window clipboard.
If you need to show code on the IRC/Reddit use Gist.