Vim is known as the ancient artifact. A small editor, the appearance is not very humble, the name of the artifact from? This is what attracts me. --In this memo.
Vim is a free software that also admires the author's philanthropic behavior and helps Ugandan children if you benefit from vim and ability.
Vim's help documentation is very detailed, but unfortunately all English is not easy to learn. There is a Vimtotur (totur:private teacher) executable file under the Windows version that is ideal for getting started and has detailed basic operations. This article, according to the software's help document, records the useful operation, and the difficulty.
First, Getting Started
01. Initial use of Vim
: Gvim file.txt Create a new file named File.txt, and a new window opens. Default to the \[user]\file.txt directory (Mac System)
: Vim file.txt creates a new file named File.txt that opens in the current window. Default to the \[user]\file.txt directory (Mac System)
02. Insert text (normal mode)--After entering the command, the software will automatically go to (insert mode) press the EXC key to exit
I insert before the cursor
A after the cursor is inserted
o Insert on the next line of the cursor (for the next line of input)
O Insert a new line above the cursor, and the original line moves down.
03. Move cursor (normal mode)
J Cursor moves down one line
K The cursor moves up one line
H cursor moves forward one character
L cursor moves backward one character
04. Delete (Normal mode)
DD Delete entire row
x Delete the characters under the cursor
J connect a line with the following line of characters
05. Undo and Redo
U undo
C-r Redo, Control+r
06. Exit
ZZ Save and exit
: q! Exit Do not save changes
07: Jump to the help document
C+] Access link
C+t back from Link
Other, move and delete commands before adding a number indicates that the command executes several times. Like 5j, move down 5 lines.
Vim Learning Record (i) Getting Started