Documenti di Didattica
Documenti di Professioni
Documenti di Cultura
com/
Vim Cheat Sheet
Global Editing Cut and paste Working with multiple files Tabs
:help keyword - open r - replace a single yy - yank (copy) a line :e file - edit a file in a :tabnew or :tabnew
help for keyword character new buffer file - open a file in a
2yy - yank (copy) 2 lines new tab
:o file - open file J - join line below to the :bnext or :bn - go to
current one with one yw - yank (copy) the the next buffer Ctrl + wT - move the
:saveas file - save file space in between characters of the word current split window
as from the cursor position :bprev or :bp - go to into its own tab
gJ - join line below to to the start of the next the previous buffer
:close - close current the current one without word gt or :tabnext or :tabn
pane space in between :bd - delete a buffer - move to the next tab
y$ - yank (copy) to end (close a file)
K - open man page for cc - change (replace) of line gT or :tabprev or :tabp
word under the cursor entire line :ls - list all open - move to the previous
p - put (paste) the buffers tab
Cursor movement cw - change (replace) to clipboard after cursor
the end of the word :sp file - open a file #gt - move to tab
h - move cursor left
P - put (paste) before in a new buffer and number #
j - move cursor down c$ - change (replace) to cursor split window
the end of the line :tabmove # - move
k - move cursor up dd - delete (cut) a line :vsp file - open a file current tab to the #th
s - delete character and in a new buffer and position (indexed from
l - move cursor right substitute text 2dd - delete (cut) 2 lines vertically split window 0)
H - move to top of S - delete line and dw - delete (cut) the Ctrl + ws - split :tabclose or :tabc -
screen substitute text (same as characters of the word window close the current tab
cc) from the cursor position
and all its windows
M - move to middle of to the start of the next Ctrl + ww - switch
screen xp - transpose two word windows :tabonly or :tabo -
letters (delete and close all tabs except
L - move to bottom of paste) D - delete (cut) to the Ctrl + wq - quit a
for the current one
screen end of the line window
u - undo :tabdo command - run
w - jump forwards to the d$ - delete (cut) to the Ctrl + wv - split
the command on all tabs
start of a word Ctrl + r - redo end of the line window vertically
(e.g. :tabdo q - closes
W - jump forwards to the . - repeat last command x - delete (cut) Ctrl + wh - move all opened tabs)
start of a word (words character cursor to the left
can contain Marking text (visual mode) window (vertical split)
punctuation) v - start visual mode, Exiting
Ctrl + wl - move
mark lines, then do a :w - write (save) the file,
e - jump forwards to the cursor to the right
command (like y-yank) but don't exit
end of a word window (vertical split)
V - start linewise visual :w !sudo tee % - write
E - jump forwards to the Ctrl + wj - move
mode out the current file
end of a word (words cursor to the window
using sudo
can contain o - move to other end of below (horizontal split)
punctuation) marked area :wq or :x or ZZ - write
Ctrl + wk - move
(save) and quit
b - jump backwards to Ctrl + v - start visual cursor to the window
the start of a word block mode :q - quit (fails if there above (horizontal split)
are unsaved changes)
B - jump backwards to O - move to other corner
the start of a word of block :q! or ZQ - quit and
(words can contain throw away unsaved
punctuation) aw - mark a word changes
{ - jump to previous
paragraph (or
function/block, when
editing code)
zz - center cursor on
screen
Insert mode -
inserting/appending text
i - insert before the
cursor
I - insert at the
beginning of the line
A - insert (append) at
the end of the line
ea - insert (append) at
the end of the word
2 of 2 12/9/17, 9:06 AM