advanced vim
Why VIM?
-
21 years of continuous development
-
Over 4,500 plugins available to date
The contents
-
Modes
- Commands
-
Movement
-
Editing
-
Searching
- Windows
- Plugins
action
Open a source file in VIM
Modes
Normal
Default behavior, used for navigation and manipulation of text.
Insert
Used for inserting new text. "Normal" mode commands are also available in "Insert" mode through the use of meta keys.
Visual
Used for navigation and manipulation of text selections. Most "Normal" mode commands are available in "Visual" mode.
Commands
Introducing the Colon
Open
:e <filename>
Write
:w <filename>
Quit
:q
Help
:h
Movement
h => left
j => down
k => up
l => right
Movement
Document Level
Page Down
<ctrl>+f
Page Up
<ctrl>+b
Jump to Top
gg
Jump to Bottom
G
Jump to Line
<line number>gg
Movement
Screen Level
Jump to Top of Screen
H
Jump to Middle of Screen
M
Jump to Bottom of Screen
L
Movement
Line Level
End of Word
e
Beginning of Word
b
End of Line
$
Beginning of Line
0
Movement
Mark
Undo Jump
``
Mark, Jump
m[a-zA-Z] => `[a-zA-Z]
Miscellaneous
Jump to Closing Character
%
Editing
Adding Data
Insert
i
Append
a
Append to Line
A
New Line
o
Editing
Replacing Data
Replace Character Under Cursor
r
Replace Word
cw
Editing
Deleting Data
Delete Character Under Cursor
x
Delete Word Under Cursor
dw
Delete Line
dd
Delete From Cursor to End of File
dG
Editing
Visual Blocks
Selecting Characters
v
Selecting Lines
V
Selecting Columns
<ctrl>+v
Editing Multiple Lines
I
Searching
Find
Basic Search
/<query>
REGEX Search
/<regex query>
Search
Find and Replace
Replace First Instance
Replace First Instance
:s/<find>/<replace>
Replace All Instances on Line
:s/<find>/<replace>/g
Replace All Instances in File
:%s/<find>/<replace>/g
Windows
Split Windows
Split Vertically
:vs
Split Horizontally
:sp
Resize Split Window
:<vertical> resize <columns>
Move to Split Window
<ctrl>+w <direction>
plugins
- tComment
- autoclose
- syntastic
- emmet
- snipmate
- tabular
- fugitive
- CtrlP
- NerdTree
- matchit
- surround
- YankRing
- airline
- supertab
- easymotion
Advanced Vim
By xfyuan
Advanced Vim
- 740