Inspired & Sources from thevaluable.dev
%
: move to the matching bracket.CTRL-e
: Scroll the window downwards.CTRL-f
: to Forward pageCTRL-u
: Up the page 1/2CTRL-b
: to Back pageCTRL-d
: Down the page 1/2{
,}
: to the previous or next empty line.H
: to the Head of the pageM
: to the Middle of the pageL
: to the Lowest of the page
diw
: Delete Inside Wordcis
: Change Inside Sentence (delete inside sentence and start INSERT mode)- A sentence should be ended with "."
yip
: Yank(copy) Inside Paragraph
V
: set visual blocks by linesCTRL-v
: set visual blocks by columns (Vertically)- use
I
to edit multiple lines
- use
Each buffers match each files. Buffers in Vim are not same with Tabs in other IDEs. Buffers can be hidden(inactive).
:buffers
shows buffers list.CTRL-^
switchs to the alternative buffer.:bn
switchs to the Next Buffer.:bp
switchs to the Previous Buffer.
Windows in Vim are spaces that show the contents of the buffers. Closing windows does not mean closing buffers.
:new
creates a new window.CTRL-w s
Splits the current window horizontally. (and opens the same buffer in the new window)CTRL-w v
splits the current window Vertically. (and opens the same buffer in the new window)CTRL-w ^
splits the current window with the alternative buffer.CTRL-w n
splits the current window with the new file edit.
CTRL-w r
rotates the window.CTRL-w R
rotates the window reverse.CTRL-w x
exchanges the next window.
Tabs contain windows.
-
:tabnew
or:tabe
opens a new tab. -
:tabclose
or:tabc
closes the current tab. -
:tabonly
or:tabo
cloese other tabs. (like clicking the close button with pressing option key in Safari) -
gt
goes to the next tab. -
gT
goes to the previous tab.
[[
moves the cursor to the previous function.]]
moves the cursor to the next function.