jm3’s “Tao of Vim”
• minimal distractions
• to know vim is to know unix
• in vim, editing is programming
• vim is everywhere
Slide 11
Slide 11 text
:beware false-prophets
•“don’t use the mouse”
•“don’t use the arrow keys”
•“use my dotfiles” :)
see Yehuda’s “Everyone Who Tried to Convince Me to use Vim was Wrong”
Slide 12
Slide 12 text
:review theory
~ any editor will get you there
~ stick shift
~ tao:
+ minimalism
+ to know vim is to know unix
+ editing is programming
+ vim is everywhere
~ beware “false prophets”:
+ mouse == OK, arrow keys are fine
Slide 13
Slide 13 text
:help practice
:q
:qq
:q!Q
:1qqZZ!q
:WTF how do i get out of here?
Slide 14
Slide 14 text
:basics!
launch + save + exit
Slide 15
Slide 15 text
:basics
foo.rb
:e
Edit foo.rb
Slide 16
Slide 16 text
:basics
: w
Write
Slide 17
Slide 17 text
:basics
eXit : x
Slide 18
Slide 18 text
:basics
Quit : q
Slide 19
Slide 19 text
:basics
w
:
Write + Quit q
Slide 20
Slide 20 text
:basics
Z Z
GTFO
Slide 21
Slide 21 text
switching modes…
Slide 22
Slide 22 text
Command Mode
Editing Mode
two very different modes
Esc
Slide 23
Slide 23 text
Sphinx of black
quartz, judge my
vow!
i
a
o
entering Edit mode:
Slide 24
Slide 24 text
Sphinx of black
quartz, judge my
vow!
i
a
o
entering Edit mode:
Slide 25
Slide 25 text
Sphinx of black
quartz, judge my
vow!
i
a
o
entering Edit mode:
Slide 26
Slide 26 text
Sphinx of black
quartz, judge my
vow!
i
a
o
entering Edit mode:
Slide 27
Slide 27 text
Basics review:
edit write exit
:w
:e :x
insert append ohhhh
a
i o
Slide 28
Slide 28 text
:motion!
Slide 29
Slide 29 text
:motion
j
h k
movement l
:masochism
Slide 30
Slide 30 text
Remember:
word + line + block
jump + search
Slide 31
Slide 31 text
:motion
w
forward word
back word b
Slide 32
Slide 32 text
:motion
⏎
line
Slide 33
Slide 33 text
:motion
]
forward block
backward block [
Slide 34
Slide 34 text
:motion
foo
/
Search
Slide 35
Slide 35 text
:motion
foo
?
Search backwards
Slide 36
Slide 36 text
:motion
Go to line number 10 G
Slide 37
Slide 37 text
:motion
G
Jump to ”corners”
G
1
Slide 38
Slide 38 text
/
Motion review:
word + line + block
⏎
w b [ ]
jump + search
47 G foo