November 2013 / Show-Me Tech
WTF I CAN'T TYPE???!?!
WHEW, THIS IS BETTER
WAIT, I THOUGHT THIS WAS A TERMINAL???
h, j, k, l |
left, down, up, right |
---|---|
i |
insert |
<esc> |
return to normal mode |
Pro tip: Try these keys in Facebook, Twitter, Gmail, and many others to see vi's far-reaching influence.
Character | Action |
---|---|
c |
change |
d |
delete |
v |
visually select |
y |
yank (copy) |
p |
put (paste) |
. |
repeat |
u |
undo |
Character | Meaning |
---|---|
$ |
end of line |
^ |
beginning of line |
w |
word |
s |
sentence |
b |
block |
Character | Meaning |
---|---|
t[letter] |
to [letter] |
i |
inside |
5 |
do 5 times |
[verb twice] |
execute on the entire line |
Keystrokes | Translation |
---|---|
d$ |
delete to the end of the line |
ciw |
change inside word |
ci" |
change inside quotes |
. |
do that again |
vt< |
visually select to carat |
yy |
yank current line |
5p |
put yanked text into buffer 5 times |
3dd |
delete current line three times |
Command | Action |
---|---|
:w [file] |
write to [file] |
:e [file] |
edit [file] |
:sp [file] |
open [file] in split window |
:vs [file] |
open [file] in vertically split window |
:tabnew |
open a new tab |
:tabf [file] |
open [file] in a new tab |
.vimrc
Can it do X? Yes.
Open your terminal. Type,
$ vimtutor
Slides, resources, and links at: