Edit command
C: Delete command
cc: Directly delete the cursor line, the cursor jumps to the beginning and transitions to the input mode
#cc: Delete the next # line in the row where the cursor is located, and the cursor jumps to the beginning of the line and transitions to input mode
C $: Deletes the contents of the cursor at the end of the line and transitions to the input mode at the cursor position
Vim visualization mode, edit mode
Visual mode
v: Select the character that the cursor is hovering over
V: Select the row where the cursor is hovering, select the entire row
Flip Screen operation
ctrl+f: Turn a screen at the end of the file;
ctrl+b: Turn one screen to the file header;
ctrl+d: Half-screen to the tail of the file;
ctrl+u: Turn half screen to file header;
The same document window is split:
ctrl+w Loosen and press s: Split horizontally
ctrl+w release and press v: Split vertically
Split window Jump:
ctrl+w Release and press the cursor key
Window Property Definition:
(cancel) Auto indent:
: Set number or : Set Nu
: Set Nonumber or : Set Nonu
(cancel) Auto indent:
: Set autoindent or : Set AI
: Set Noai
(cancel) is case sensitive:
: Set ignorecase or : Set IC
: Set Noic
(cancel) to display matching parentheses:
: Set Showmatch or : Set SM
: Set NOSM
(cancel) to display syntax coloring:
: Syntax on
: Syntax off
(cancel) The search results highlighted:
: Set Hlsearch
: Set Nohlsearch
Get help:
: Set
: Help [command]
————————————————————
All of these are temporary and require long-term and effective changes to the Vim configuration file
Vim configuration file:
Global:/ETC/VIMRC
Personal:~/.VIMRC
————————————————————
Find Replacements:
: Address delimitation s/Find content (can use mode)/replace content (cannot use mode)/GI (Global Global) (ignorecase case insensitive) (delimiter / can use other special symbols #,@)
Address delimitation:
%: Full text
1,$: Full text, representing the 1th to the last line;
1,+6: Indicates the 1th line and then down 6 lines;
1,$-2: Represents line 1th to the 3rd line;
., +3: Thecurrent cursor line and then down 3 rows;
Use & to find content before and after adding characters
For example, add # to the beginning of a line that starts with a blank character:
%s/^[[:space:]]/#&/
This article is from the "Arvin Lau" blog, be sure to keep this source http://64314491.blog.51cto.com/2784219/1627462
Vim of the Linux text Editor (ii)