In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-01-31 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Network Security >
Share
Shulou(Shulou.com)06/01 Report--
Vi:Visual Interface, Bill 喜悦, S.U.N (Stanford)
Vim:VI improved
Pattern editor:
Edit mode {command mode)
Last row mode
Insert mode (input mode)
Replacement mode
Visualization mode
One:
How Vi/vim is opened
1.vi/vim opens the interface of vi
2.Vim File name Open File cursor in the first character position the file does not exist to open as a new file, if saved, the file is created as a new file, if not saved, the file disappears.
3. Vim + # file name opens the file cursor at the beginning of line #, and if the number of lines located is larger than that of the entire document, the cursor stops at the beginning of the last line of the file.
4.vim + filename: position the cursor directly at the beginning of the last line of the document.
5.vim + / PATTERN/ (mode): open the file and position the cursor at the beginning of the line that was first matched by PATTERN, that is, only the first match is completed.
Two:
The shutdown method of Vim:
Turn off the last line mode:
: Q close the vim editor directly without saving the changes.
: q! Forced exit will not be saved.
: W save the changes.
Wq saves the changes and closes the vim editor
: wq! For root users, some changes to read-only files can be forced to save and exit.
Turn off edit mode:
ZZ: save and exit
ZQ: do not save exit
Three:
Move the cursor in edit mode in vim:
1. Move character by character
1.ARROW
2.h: cursor to the left
J: cursor down
K: cursor down
L: cursor to the right
two。 Move word by word
W: move to the prefix of the next word
E: move to the suffix of the next word
B: move to the prefix of the previous word
3. Inline jump:
0: absolute beginning of line
^: relative to the beginning of the line
$: absolute end of line
4: jump between lines:
# G: move the cursor directly to line
G: move the cursor directly to the last line of the document
Gg: move the cursor directly to the first line
Cursor movement in last line mode
: # move the cursor directly to line
1 move the cursor directly to the first line
: $move the cursor directly to the last line of the document
Four: flip the screen
Ctrl+f: flip down one screen
Ctrl+b: flip up one screen
Ctrl+d: flip down half the screen
Ctrl+u: flip half the screen up
5. Delete character by character:
X: delete a single character where the cursor is located
X: delete a single character to the left of the cursor location
VI. Omnipotent delete command in edit mode
D: delete everything the cursor passes over (dh,dj,dk,dl. )
Dd: delete the line where the cursor is located
In the last line mode:
: d: delete the line where the cursor is located
: # d: delete line
: mdjinghnd: delete all lines starting with m and passing n lines
:. $d: delete the line where the cursor is located to the last line
: mdjnnd (mrecom n stands for numerical value)
.: indicates the line where the current cursor is located
$: the last line of the document
., $: from the line of the cursor to the last line of the document
M ~ 2 ~ n: starting from the line where the current cursor is located, after n lines
Seventh, the universal paste command in edit mode:
P (lower): paste right down.
P (upper): paste left and down.
In the last line mode:
P
Eight. Universal copy command in edit mode:
Y: copy everything the cursor passes over
The usage is the same as d
Yy: copy the line of the cursor
9. Mode switching:
1. From edit mode to last line mode:
: enter a command
/ and? To make a search, n and N represent a sequential search, and N represents a reverse search.
/: top-down
? From the bottom up
two。 From the last line to the editor:
Esc key
Enter key
Backspace key
3. From edit mode to input mode:
I: move the cursor to the beginning of the line to enter input mode
I: insert information in front of the cursor location
A: move the cursor to the end of the line and enter input mode
A: insert a character after the position of the cursor
O: insert a new line above the line where the cursor is located
O: insert a new line below the line where the cursor is located
Cc: enter input mode after deleting the entire line
C: delete from the cursor to the end of the line and enter input mode.
S: delete a character where the cursor is located and enter input mode
S: delete the line of the cursor and enter input mode
4. From input mode to edit mode:
Esc key
5. From edit mode to replacement mode
R: enter replacement mode
6. From replacement mode to editing mode
Esc key
7. From edit mode to visualization mode:
V: select rectangles in terms of characters
V: select rectangles according to behavior units
You can copy (y) or delete (d) after the selection, and return to edit mode after the operation is completed.
All mode switches must go through the edit mode, and there is no way to switch between the two non-edit modes.
Ten. Replace the command.
R: replace one character where the cursor is located
11. Undo the editing operation
U: undo a previous editing operation.
Ctrl+r: undoes the most recent undo operation.
Twelve, repeat the previous editing operation
. Repeat the previous operation.
Thirteen, special last line command.
1. Show and cancel line number
: set number (: set nu)
: set nonumber (: set nonu)
two。 Turns case differentiation of characters on or off:
: set ignorecase (: set ic)
: set noignorecase (: set noic)
3. Turns automatic indentation on or off.
: set autoindent (: set ai)
: set noautoindent (: set noai)
4. Turns lookup highlighting on or off.
: set
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.