Professional Documents
Culture Documents
:sav[eas] file - save file as R - replace more than one character, until ESC is q - stop recording macro
pressed.
:clo[se] - close current pane @a - run macro a
J - join line below to the current one with one
:ter[minal] - open a terminal window @@ - rerun last run macro
space in between
K - open man page for word under the cursor
gJ - join line below to the current one without Cut and paste
space in between
M - move to middle of screen S - delete line and substitute text (same as cc)
gP - put (paste) before cursor and leave cursor
L - move to bottom of screen xp - transpose two letters (delete and paste) after the new text
W - jump forwards to the start of a word (words U - restore (undo) last changed line 2dd - delete (cut) 2 lines
can contain punctuation) dw - delete (cut) the characters of the word from
Ctrl + r - redo
the cursor position to the start of the next word
e - jump forwards to the end of a word
. - repeat last command
E - jump forwards to the end of a word (words can diw - delete (cut) word under the cursor
contain punctuation) Marking text (visual mode) daw - delete (cut) word under the cursor and the
ge - jump backwards to the end of a word Tip You can also use the following characters
o - move to other end of marked area
to specify the range:
gE - jump backwards to the end of a word (words Ctrl + v - start visual block mode e.g.
can contain punctuation)
O - move to other corner of block :.,$d - From the current line to the end of
% - move cursor to matching character (default the file
supported pairs: '()', '{}', '[]' - use :h matchpairs aw - mark a word :.,1d - From the current line to the
beginning of the file
in vim for more info)
ab - a block with () :10,$d - From the 10th line to the beginning
of the file
0 - jump to the start of the line
aB - a block with {}
^ - jump to the first non-blank character of the
at - a block with <> tags
line :g/{pattern}/d - delete all lines containing
ib - inner block with () pattern
$ - jump to the end of the line
iB - inner block with {} :g!/{pattern}/d - delete all lines not containing
g_ - jump to the last non-blank character of the
pattern
line it - inner block with <> tags
d$ or D - delete (cut) to the end of the line
gg - go to the first line of the document Esc or Ctrl + c - exit visual mode
x - delete (cut) character
G - go to the last line of the document
Tip Instead of b or B one can also use ( or
5gg or 5G - go to line 5
{ respectively.
Indent text
gd - move to local declaration
>> - indent (move right) line one shiftwidth
gD - move to global declaration Visual commands << - de-indent (move left) line one shiftwidth
fx - jump to next occurrence of character x
> - shift text right >% - indent a block with () or {} (cursor on brace)
tx - jump to before next occurrence of character x
< - shift text left <% - de-indent a block with () or {} (cursor on
Fx - jump to the previous occurrence of character brace)
y - yank (copy) marked text
x
>ib - indent inner block with ()
d - delete marked text
Tx - jump to after previous occurrence of
>at - indent a block with <> tags
character x ~ - switch case
3== - re-indent 3 lines
; - repeat previous f, t, F or T movement u - change marked text to lowercase
=% - re-indent a block with () or {} (cursor on
, - repeat previous f, t, F or T movement, U - change marked text to uppercase
brace)
backwards
ea - insert (append) at the end of the word :ju[mps] - list of jumps e.g. :vim[grep] /foo/ **/*
Ctrl + h - delete the character before the cursor Ctrl + i - go to newer position in jump list
during insert mode :cn[ext] - jump to the next match
Ctrl + o - go to older position in jump list
Ctrl + w - delete word before the cursor during :cp[revious] - jump to the previous match
insert mode :changes - list of changes
:cope[n] - open a window containing the list of
Ctrl + j - add a line break at the cursor position g, - go to newer position in change list
matches
during insert mode
g; - go to older position in change list
:ccl[ose] - close the quickfix window
Ctrl + t - indent (move right) line one
Ctrl + ] - jump to the tag under cursor
shiftwidth during insert mode
Tabs
Ctrl + d - de-indent (move left) line one
Tip To jump to a mark you can either use a :tabnew or :tabnew {page.words.file} -
shiftwidth during insert mode
backtick ( ` ) or an apostrophe ( ' ). Using an open a file in a new tab
Ctrl + n - insert (auto-complete) next match apostrophe jumps to the beginning (first non-
before the cursor during insert mode Ctrl + wT - move the current split window into
blank) of the line holding the mark.
its own tab
Ctrl + p - insert (auto-complete) previous match
before the cursor during insert mode gt or :tabn[ext] - move to the next tab
Esc or Ctrl + c - exit insert mode :tabm[ove] # - move current tab to the #th
position (indexed from 0)
:bd[elete] - delete a buffer (close a file) zo - open fold under the cursor
:b[uffer] file - go to a buffer by file zr - reduce (open) all folds by one level
:ls or :buffers - list all open buffers zm - fold more (close) all folds by one level
:sp[lit] file - open a file in a new buffer and split window zi - toggle folding functionality
:vs[plit] file - open a file in a new buffer and vertically split window ]c - jump to start of next change
:vert[ical] ba[ll] - edit all buffers as vertical windows [c - jump to start of previous change
:tab ba[ll] - edit all buffers as tabs do or :diffg[et] - obtain (get) difference (from other buffer)
Ctrl + wv - split window vertically :diffthis - make current window part of diff
Ctrl + wq - quit a window :diffo[ff] - switch off diff mode for current window
Ctrl + wH - make current window full height at far left (leftmost vertical
window)
Ctrl + wL - make current window full height at far right (rightmost vertical
window)
Ctrl + wK - make current window full width at the very top (topmost
horizontal window)
Additional Resources
Català
❤ Please consider sponsoring this project ❤ !
You can read about how to contribute (and help improve) by viewing our README .
Čeština There you can see how to set up this project, or how to contribute a new language. Here
Dansk is a big thank you to our contributors!
Hrvatski
Magyar
Bahasa Indonesia
Italiano
⽇本語
한국어
ြမန်မာ
Nederlands
Norsk
Polski
Português - Brasil
Português - Portugal
Romana
Русский
ංහල
Slovenčina
Svenska
ภาษาไทย
Türkçe
Українська
Tiếng Việt
简体中文
中文 (台灣)
version: 3.2.0