Skip to content
Adrian Juszczak edited this page Oct 31, 2017 · 19 revisions

Normal

  • 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

Insert

  • <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

Visual

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>

Command

  • :sort - sort lines

Fold [z]

  • zf - create fold (motion/visual)
  • zF - create fold (count)
  • zd - delete fold under the cursor
  • zD - delete fold under the cursor recursively
  • zE - eliminate

Special

Location

  • :lop[en] - open
  • :lcl[ose] - close
  • :ln[ext] - next location list item
  • :pn[ext] - previous location list item

Quickfix

  • :cope[n] - open
  • :ccl[ose] - close
  • :cn[ext] - next quickfix file
  • :cp[revious] - previous quickfix file

Preview

  • :pc[lose] - close

Help

  • :h[elp] - open
  • :helpc[lose] - close
  • <C-]> - jump to quickref topic
  • <C-t> - go back to previous topic

Utils

  • ga/:as[cii] – get ASCII code of character under the cursor
Clone this wiki locally