Vi
Open or NewVI filename Opens or creates a new file and places the cursor at the beginning of the first
cursorThe
cursor moves to the end of the sentence
(The cursor moves to the beginning of the sentence
screen Tumbling Class command
Ctrl+u the first half screen to the file
Ctrl+d half screen to file end
Insert Text Class command
I before the cursor
Delete
Ctrl+u To delete the text entered under input mode
Find/pattern: Searches for pattern n from the beginning of the cursor to the end of the file repeat the last search command in the same direction
N repeats the last search command in the opposite direction after entering the command line mode
Find/help can find the Help keyword press N to continue looking for the next
last line mode command: q! Do not save the file and exit Vi:x Save the current file and exit
Cursor control
| H |
Cursor moves left |
| J |
Cursor moves down |
| K |
Cursor moves up |
| L (or SPACEBAR) |
Cursors Move Right |
| W |
Move forward one word |
| B |
Move one word backwards |
| E |
Moves one word forward, and the cursor points to the end of the word |
| ( |
Move to the header of the current sentence |
| ) |
Move to the header of the next sentence |
| { |
Move to the header of the current segment |
| } |
Move to the header of the next paragraph |
| [[ |
Move to the header of the current section |
| ]] |
Move to the header of the next section |
| 0 |
Move to the header of the current line |
| $ |
Move to the tail of the current line |
| ^ |
Move to the first non-whitespace character in the current line |
| + or RETURN |
Move to the first character of the next line |
| - |
Move to the first character of the previous line |
| N | |
Move to the current line where the character n is |
| H |
Move to the header of the current screen |
| M |
Move to the middle of the current screen |
| L |
Move to the tail of the current screen |
| N H |
Move to n rows at the top of the current screen |
| N L |
Moves to n rows at the end of the current screen |
| Ctrl-f |
Move to the next screen |
| Ctrl-b |
Move to the previous screen |
| Ctrl-d |
Move Down half screen |
| Ctrl-u |
Move Up half screen |
|
|
|
|
| Z RETURN |
Refresh the screen, adjust the screen so that the current cursor in the refreshed screen after the header (is not understood??? If you don't understand it, try to know what it means. |
| Z. |
Refreshes the screen, adjusts the screen so that the current cursor is in the middle of the refreshed screen |
| Z- |
Refreshes the screen, adjusts the screen so that the current cursor is at the end of the refreshed screen |
| Ctrl-l |
Refresh the screen without adjusting the screen position |
| Ctrl-r |
Refresh the screen without adjusting the screen position |
| /Text |
Search down text |
| / |
Repeat the contents of the last search to search down once |
| ? text |
Search up text |
| ? |
Repeat on this search up one time |
| N |
Repeat on this search, search down |
| N |
Repeat the search on this, search up |
| /text/+n |
Move to the next n line of text |
| ? text?-N |
Move to the top n row of the text row |
|
|
|
|
| N G |
Move to N rows |
| :N |
Move to N rows |
| G |
Move in the last row |
LINUX VI Common Commands