9. VIM MODES
Normal Insert Bottom Line
Should be used most
of the time. Move
around document,
cut/copy/paste,
search/replace, etc...
10. VIM MODES
Normal Insert Bottom Line
Should be used most Typing mode, used to
of the time. Move enter new text.
around document, Noobs spend too
cut/copy/paste, much time here.
search/replace, etc...
11. VIM MODES
Normal Insert Bottom Line
Should be used most Typing mode, used to Used to change the
of the time. Move enter new text. vim environment,
around document, Noobs spend too open/close buffers,
cut/copy/paste, much time here. and so much more.
search/replace, etc...
16. MOVING AROUND A DOCUMENT
h,j,k,l = left, up, down, right
w,b = forward/backward one word
17. MOVING AROUND A DOCUMENT
h,j,k,l = left, up, down, right
w,b = forward/backward one word
0,$ = beginning/end of line
18. MOVING AROUND A DOCUMENT
h,j,k,l = left, up, down, right
w,b = forward/backward one word
0,$ = beginning/end of line
(,) = beginning / end of sentence
19. MOVING AROUND A DOCUMENT
h,j,k,l = left, up, down, right
w,b = forward/backward one word
0,$ = beginning/end of line
(,) = beginning / end of sentence
{,} = beginning / end of paragraph
20. MOVING AROUND A DOCUMENT
h,j,k,l = left, up, down, right
w,b = forward/backward one word
0,$ = beginning/end of line
(,) = beginning / end of sentence
{,} = beginning / end of paragraph
G = end of file (1G goes to top, nG goes to line n)
21. MOVING AROUND A DOCUMENT
h,j,k,l = left, up, down, right
w,b = forward/backward one word
0,$ = beginning/end of line
(,) = beginning / end of sentence
{,} = beginning / end of paragraph
G = end of file (1G goes to top, nG goes to line n)
% = go to matching bracket
22. MOVING AROUND A DOCUMENT
h,j,k,l = left, up, down, right
w,b = forward/backward one word
0,$ = beginning/end of line
(,) = beginning / end of sentence
{,} = beginning / end of paragraph
G = end of file (1G goes to top, nG goes to line n)
% = go to matching bracket
zt,zz,zb = move current line to top/center/bottom of viewport
25. ENTERING INSERT MODE
i,a = insert text before/after cursor
I,A = insert text at the beginning/end of line
26. ENTERING INSERT MODE
i,a = insert text before/after cursor
I,A = insert text at the beginning/end of line
o,O = open a new line after/before current one
29. SEARCH AND REPLACE
/string, ?string = search for string forwards / backwards
n,N = find next/previous occurrence
30. SEARCH AND REPLACE
/string, ?string = search for string forwards / backwards
n,N = find next/previous occurrence
:%s/find/replace/[ g | i |c ] =
31. SEARCH AND REPLACE
/string, ?string = search for string forwards / backwards
n,N = find next/previous occurrence
:%s/find/replace/[ g | i |c ] =
g=all occurrences on a line
32. SEARCH AND REPLACE
/string, ?string = search for string forwards / backwards
n,N = find next/previous occurrence
:%s/find/replace/[ g | i |c ] =
g=all occurrences on a line
i=case insensitive
33. SEARCH AND REPLACE
/string, ?string = search for string forwards / backwards
n,N = find next/previous occurrence
:%s/find/replace/[ g | i |c ] =
g=all occurrences on a line
i=case insensitive
c=confirm
34. SEARCH AND REPLACE
/string, ?string = search for string forwards / backwards
n,N = find next/previous occurrence
:%s/find/replace/[ g | i |c ] =
g=all occurrences on a line
i=case insensitive
c=confirm
ctrl-a, ctrl-x = increment/decrement next number on line
35. SEARCH AND REPLACE
/string, ?string = search for string forwards / backwards
n,N = find next/previous occurrence
:%s/find/replace/[ g | i |c ] =
g=all occurrences on a line
i=case insensitive
c=confirm
ctrl-a, ctrl-x = increment/decrement next number on line
:bufdo /search/ = search all open buffers
36. EDITING TEXT
x = delete single character w = word
d = delete (cut) dw = delete word
y = yank (copy) yw = yank word
p,P = paste after/before examples
u = undo dd, yy, <n>dd, <n>yy
J = join lines, current and next line <n>p, <n>u
<,> = reduce, increase indentation d$, yG, <n>cc, <n>cw, c$
. = repeat last command
c = change
39. BUFFERS
The contents of a file are loaded into memory (buffer)
:buffers, :ls = list buffers
:e <file> = edit/open a file into a new buffer
:bn, :bp = next/previous buffer
:bd = delete buffer
:buffer <n> = jump to buffer <n>
:sbuffer <file> = split buffer, open in another window
40. WINDOWS
:hsplit,:vsplit = split horizonal/vertical
ctrl-w = start a window command (cw)
cw<hjkl> = move left,up,down,right one window
cwcw = cycle windows
cw_ = maximize current window
cw= = make all windows equal size
10cw+ = increase window by 10 lines (- would decrease)
:only = make this the only window
41. TABS
:tabs = list all tabs
:tabnext = next tab
:tabdo %s/2.5.2/2.6.0/gc
:tabnew
:tabedit
:tabfirst
:tablast
:tabm <n> = move tab to position
42. MARKERS
m<a-z> = set mark, labeled a-z
‘<a-z> = go to mark
d’<a-z> = delete from here to mark
y’<a-z> = yank from here to mark
47. SELFISH PLUG
HeadNorth helps local people from San Diego with Spinal Cord Injuries
Spinal Cord Injuries are crippling, HeadNorth tries to help in the transition
They go far beyond, and help with chairs, even remodeling homes.
Donate Here
Long version:
www.kintera.org/faf/r.asp?t=4&i=1035746&u=1035746-369694704
www.headnorthevents.org