Compilation Example: g++-o hello hello.cpp-std=c++11, where-std=c++11 represents support for c++111 new features
Command mode execution after ESC is pressed
A after inserting a letter
I insert the current cursor
-------------------------------------------
DD Delete When moving forward
YY copy when moving forward
-------------------------------------------
V Selection
D Cut
Y copy
P paste on top of current cursor
P paste below the current cursor
Shift+p pasting before the current line
-------------------------------------------
U undo Operation
Ctrl+r Repeat Operations
-------------------------------------------
^ Move to the first non-whitespace character of the bank
0 (number 0) moves to the first character of the Bank,
$ move to end of line
3$ move to the end of line 3 below
Ctrl+f Jump to next page
Ctrl+b Jump Previous Page
[[/gg File header
]]/g file Footer
-------------------------------------------
: Set NU Displays line number
: 100 Jump to 100 position
-------------------------------------------
: q! Do not save exit
: W Save
: X Save exit
-------------------------------------------
/xxx looking backwards for XXX
? xxx look up xxx
n continue to find the next
: Set Nohlsearch Close Highlight search display
------------------------------------------
:%S/ABC/123/GC replaces ABC with 123
Vim's most-used commands