-
Notifications
You must be signed in to change notification settings - Fork 0
Vim
Adrian Juszczak edited this page Oct 31, 2017
·
19 revisions
-
gf
- goto file -
ciw
- change current word -
viw
- select current word -
.
- repeat lasst insertion -
<C-o>
- jump to older location -
<C-i>
- jump to newer location
-
<C-h>
- delete back one character (backspace) -
<C-w>
- delete back one word -
<C-u>
- delete back to start of line -
<C-i>
- insert a tab -
<C-j>
- begin new line -
<C-m>
- enter -
<C-r>
- insert register register (:help i_CTRL-R
) -
<C-t>
- insert one indent at the start of the current line -
<C-d>
- delete one indent at the start of the current line -
<C-a>
- insert last inserted text
HTML tags selection:
-
vat
- a tag block -
vit
- inner tag block -
"*y
- copy selection to system clipboard
Code selection:
-
vab
- a block with () -
vaB
- a block with {} -
vib
- inner block with () -
viB
- inner block with {}
Strings: [i/a]
-
vi'
- select inner'string'
without''
-
va'
- select a'string'
with''
-
vi"
- select inner"string"
vi>
-
:sort
- sort lines
-
zf
- create fold (motion/visual) -
zF
- create fold (count) -
zd
- delete fold under the cursor -
zD
- delete fold under the cursor recursively -
zE
- eliminate
-
:lop[en]
- open -
:lcl[ose]
- close -
:ln[ext]
- next location list item -
:pn[ext]
- previous location list item
-
:cope[n]
- open -
:ccl[ose]
- close -
:cn[ext]
- next quickfix file -
:cp[revious]
- previous quickfix file
-
:pc[lose]
- close
-
:h[elp]
- open -
:helpc[lose]
- close -
<C-]>
- jump to quickref topic -
<C-t>
- go back to previous topic
-
ga
/:as[cii]
– get ASCII code of character under the cursor