Linux_vim editor

The Vi editor is a standard editor under all Unix and Linux systems, similar to the notepad (notepad) editor under the windows system. Since the Vi editor is exactly the same in any version of the Unix and Linux systems, it can be used in Any other place where vi is introduced can further understand it. Vi is also the most basic text editor in Linux. After learning it, we will be able to move freely in the Linux world, especially in the terminal

About vim:

Both vi and vim are editors in Linux. The difference is that vim is more advanced and can be regarded as an upgraded version of vi.

vi is used for text editing, but vim is more suitable for coding (writing code).

Vim focuses on cursor movement, mode switching, delete, find, replace, copy, paste, and the use of undo commands**.

Vim three modes (emphasis)

There are three modes (public perception) in Vim: command mode, edit mode (input mode), and end-line mode (end-line mode) .

Command mode: In this mode, the file cannot be directly edited , and you can enter shortcut keys to perform some operations

​ (delete line, copy line, move cursor, paste, etc.) [the default mode after opening the file];

Edit mode: In this mode, the content of the file can be edited;

Last line mode: You can enter commands in the last line to operate on the file (search, replace, save, exit, undo, highlight, etc.);

Vim's way to open files (4 types, the first three are required to master):

#vim file path function: open the specified file

#vim + the path function of the digital file: open the specified file and move the cursor to the specified line

#vim +/The path function of the keyword file: open the specified file and highlight the keyword

#vim file path 1 file path 2 file path 3 Function: open multiple files at the same time

Exit method: Enter :qand press Enter

Use: open multiple files at the same time

img

Guess you like

Origin blog.csdn.net/qq_38758371/article/details/130137459