vi/vim cheat sheet
-
-
- z~
- z!
- z@
- z#
- z$
- z%
- z^ page above
- z&
- z*
- z(
- z)
- z_
- z+ page below
- z`
- z1
- z2
- z3
- z4
- z5
- z6
- z7
- z8
- z9
- z0
- z- line at bottom
- z= spelling suggestions
- g~ toggle case
- g!
- g@ operatorfunc
- g# rev. find string
- g$ virtual eol
- g%
- g^ "soft" bol virtual
- g& repeat :s globally
- g* find string
- g(
- g)
- g_ "soft" eol
- g+ forward undo branch
- g`· to mark keepjumps
- g1
- g2
- g3
- g4
- g5
- g6
- g7
- g8 char hex values
- g9
- g0 virtual bol
- g- backward undo branch
- g=
- ~ toggle case
- ! external filter
- @· play macro
- # rev. find word
- $ eol
- % goto match
- ^ "soft" bol
- & repeat :s
- * find word
- ( begin sentence
- ) end sentence
- _ "soft" bol down
- + next line
- `· goto mark
- 1
- 2
- 3
- 4
- 5
- 6
- 7
- 8
- 9
- 0 "hard" bol
- - prev line
- = auto format
-
- c-wQ
- c-wW
- c-wE
- c-wR
- c-wT
- c-wY
- c-wU
- c-wI
- c-wO
- c-wP
- c-w{
- c-w}
- c-wq
- c-ww
- c-we
- c-wr
- c-wt
- c-wy
- c-wu
- c-wi
- c-wo
- c-wp
- c-w[
- c-w]
- ZQ :q!
- ZW
- ZE
- ZR
- ZT
- ZY
- ZU
- ZI
- ZO
- ZP
- Z{
- Z}
- zQ
- zW temp misspelling
- zE eliminate folds
- zR open all folds
- zT
- zY
- zU
- zI
- zO open folds recursively
- zP
- z{
- z}
- zq
- zw add misspelling
- ze cursor at right side
- zr reduce folding
- zt line at top
- zy
- zu
- zi toggle all folds
- zo open fold
- zp
- z[
- z]
- gc-q
- gc-w
- gc-e
- gc-r
- gc-t
- gc-y
- gc-u
- gc-i
- gc-o
- gc-p
- gc-[
- gc-] go to tjump
- gQ ex mode manual :
- gW
- gE back to word end
- gR replace mode virtual
- gT
- gY
- gU uppercase
- gI insert at soft bol
- gO
- gP paste before no move
- g{
- g}
- gq format
- gw format no move
- ge back to word end
- gr· replace char vir.
- gt
- gy
- gu lowercase
- gi insert at last pos
- go :goto (byte)
- gp paste no move
- g[
- g] go to tselect
- c-q [ctrl-v]
- c-w window cmds
- c-e window down
- c-r redo
- c-t previous tag
- c-y window up
- c-u scroll up
- c-i jump to newer
- c-o jump to older
- c-p [k]
- c-[
- c-] go to tag
- Q ex mode
- W next word
- E end word
- R replace mode
- T back 'til
- Y yank line
- U undo line
- I insert at bol
- O open above
- P paste before
- { begin parag.
- } end parag.
- q· record macro
- w next word
- e end word
- r· replace char
- t· 'til
- y yank
- u undo
- i insert mode
- o open below
- p paste after
- [· move backwards
- ]· move forward
-
- ZA
- ZS
- ZD
- ZF
- ZG
- ZH
- ZJ
- ZK
- ZL
- Z:
- Z"
- Z|
- zA toggle fold recursively
- zS
- zD delete folds recursive
- zF fold lines
- zG ignore spelling
- zH scroll ▶ half screen
- zJ
- zK
- zL scroll ◀ half screen
- z:
- z"
- z|
- za toggle fold
- zs cursor at left side
- zd delete fold
- zf create fold
- zg correct spelling
- zh scroll ▶
- zj next fold start
- zk prev fold end
- zl scroll ◀
- z;
- z'
- z\
- c-wA
- c-wS
- c-wD
- c-wF
- c-wG
- c-wH
- c-wJ
- c-wK
- c-wL
- c-w:
- c-w"
- c-w|
- c-wa
- c-ws
- c-wd
- c-wf
- c-wg
- c-wh
- c-wj
- c-wk
- c-wl
- c-w;
- c-w'
- c-w\
- gc-a mem usage stats
- gc-s
- gc-d
- gc-f
- gc-g cursor pos info
- gc-h select block
- gc-j
- gc-k
- gc-l
- gc-;
- gc-'
- gc-\
- gA
- gS
- gD global declaration
- gF edit file + jump
- gG
- gH select lines
- gJ join leave spacing
- gK
- gL
- g:
- g"
- g|
- ga char value
- gs sleep
- gd local declaration
- gf edit file at cursor
- gg first line
- gh select mode
- gj display line down
- gk display line up
- gl
- g; to prev change pos
- g'· to mark keepjumps
- g\
- c-a increment
- c-s (xoff)
- c-d scroll down
- c-f page down
- c-g :file (info)
- c-h [h]
- c-j [j]
- c-k
- c-l redraw
- c-;
- c-'
- c-\
- A append to eol
- S subst line
- D delete to eol
- F· "back" fwd
- G eof/goto ln
- H screen top
- J join lines
- K help
- L screen bottom
- : ex cmd line
- "· use register
- | bol/goto col
- a append
- s subst char
- d delete
- f· fwd to char
- g· extra cmds
- h ◀
- j ▼
- k ▲
- l ▶
- ; repeat t/T/f/F
- '· goto mark bol
- \· not used
-
- c-wc-z
- c-wc-x
- c-wc-c
- c-wc-v
- c-wc-b
- c-wc-n
- c-wc-m
- c-wc-,
- c-wc-.
- c-wc-/
- c-wZ
- c-wX
- c-wC
- c-wV
- c-wB
- c-wN
- c-wM
- c-w<
- c-w>
- c-w?
- c-wz close preview
- c-wx exchange window
- c-wc :close window
- c-wv split vertically
- c-wb bottom window
- c-wn open new
- c-wm
- c-w,
- c-w.
- c-w/
- ZZ :wq
- ZX
- ZC
- ZV
- ZB
- ZN
- ZM
- Z<
- Z>
- Z?
- zZ
- zX reapply folds
- zC close folds reccursively
- zV
- zB
- zN fold normal
- zM close all folds
- z<
- z>
- z?
- zz line at center
- zx update folds
- zc close fold
- zv unfold cursor line
- zb line at bot. bol
- zn fold none
- zm fold more
- z,
- z. line at center bol
- z/
- gc-z
- gc-x
- gc-c
- gc-v
- gc-b
- gc-n
- gc-m
- gc-,
- gc-.
- gc-/
- gZ
- gX
- gC
- gV avoid reselection
- gB
- gN
- gM
- g< see prev cmd output
- g>
- g? rot13 encode
- gz
- gx
- gc
- gv previous visual mode
- gb
- gn
- gm g0 right half screen
- g, to next change pos
- g.
- g/
- c-z :suspend
- c-x substract
- c-c abort
- c-v visual block
- c-b page up
- c-n [j]
- c-m [+]
- c-,
- c-.
- c-/
- Z· quit
- X backspace
- C change to eol
- V visual lines
- B prev word
- N prev find
- M screen mid'l
- < unindent
- > ident
- ?· find rev.
- z· extra cmds
- x delete char
- c change
- v visual mode
- b prev word
- n next find
- m· set mark
- , reverse t/T/f/F
- . repeat cmd
- /· find
- motion
- Moves the cursor, or defines the range for an operator.
- command
- Direct action command, if red, it enters insert mode.
- operator
- Requires a motion afterwards, operates between cursor and destination.
- mode
- q·
- Commands with a dot need a char argument afterwards.