How do I input the vi command in Linux?

Updated on technology 2024-03-11
6 answers
  1. Anonymous users2024-02-06

    Enter the commands in turn.

    1. i inserts i at the current position before death, a at the beginning of the current line, a after the current position, o at the end of the current line, o after the current line, and a line before the current line.

    2. Text to find text, press n health to find the next one, press n health to find the previous onetext to find text, reverse to search, press n health to find the next one, press n health to find the previous one.

    3. There are some special characters in vim that need to be escaped when looking up$set ignorecase, ignore case search: set noignorecase, do not ignore case search to find a very long word, if a word is very long and difficult to type, you can move the cursor over the word, press the * or key to search for the word.

    4. Set nohlsearc to turn off the highlighted search display, nohlsearch turns off the current highlight, if you search again or press the n or n key, it will be highlighted again. :set incsearch step-by-step search mode to search for the currently typed character without having to wait for typing to complete. :set wrapscan, when the header or footer of the file is found, return to continue searching, which is enabled by default.

    5. ra replaces the current character with a, and the current character is the character where the cursor is located. s old new with old, replace the first match in the current row, replace old new g with old, replace all matches in the current row%s old new with old.

  2. Anonymous users2024-02-05

    Basically, VI can be divided into three operating states, namely Command Mode, Insert Mode, and Last Line Mode, and the functions of each mode are divided as follows

    1. Comand mode: control the movement of the screen cursor, delete characters or cursors, move and copy a certain section and enter the insert mode, or go to the last line mode.

    2. Insert mode: Only in insert mode, you can do text data input, press esc, etc. to return to comand mode.

  3. Anonymous users2024-02-04

    1. First open Linux VI and enter the page, 2. Then press the "ESC" button to switch to command mode.

    3. Then you can also press the "Ctrl+C" shortcut key, so that you can quickly switch to the command mode.

    4. Then you can also press the "Ctrl+[" shortcut key, so that you can also quickly switch to the command mode.

  4. Anonymous users2024-02-03

    The steps to enter command mode in Linux VI are as follows:

    1. Press the ESC key to exit the insertion mode and enter the command mode (normal mode).

    2. Press Ctrl+C to quickly exit the insertion mode and enter the command mode (normal mode).

    3. Press Ctrl+[ to exit the insertion mode and enter the command mode (normal mode).

    4. Customize the key mapping, press the JJ key to quickly exit the insertion mode and enter the command mode (normal mode).

  5. Anonymous users2024-02-02

    The steps for Linux VI to enter command mode are as follows:

    1. Connect to the Linux host and enter the command line state.

    2. Enter: vi file name (including path), e.g. press enter.

    3. At this time, the command mode of the vi device has been entered, and the command of the vi command mode can be used for the opened file.

  6. Anonymous users2024-02-01

    In vi's command mode, complex commands can be used. Type ":" in the mode to jump to the last line of the screen and a colon appears there, and you're in command mode.

    Command mode, also known as "last line mode", where the user's input is displayed on the last line of the screen, press enter, vi to execute the command.

Related questions
15 answers2024-03-11

Note that the getline function uses a carriage return as a terminator, but it does not take a carriage return into account. in the first, 5); At the end of the end, a carriage return is kept in the cache when executed to the second, 5); The function reads the carriage return that is kept in the cache, and thinks that the read has ended, so the second string of five characters entered after that is not read into ch, of course, ch is empty, and can be used; Solve this problem; Here's how: >>>More

9 answers2024-03-11

man shmget as well as shmat(2), shmctl(2), shmdt(2).

If the operation you can refer to. >>>More

4 answers2024-03-11

Let's start with the relatively complex server implementation of PHP. If you have PHP installed on your server, you can execute PHP files, regardless of whether you have installed server environment software such as Nginx or Apache. In Linux, using the command line and crontab to schedule tasks is an excellent choice, and it is also the most efficient choice. >>>More

25 answers2024-03-11

In ICL lens implantation surgery, an intraocular lens (ICL) needs to be implanted into the eye, located behind the iris, and fixed in the ciliary sulcus to maintain the natural adjustment function of the lens and play a role in correcting myopia. Since the material of the intraocular lens used in ICL lens implantation surgery is very close to the natural lens of the human being, and each intraocular lens is "tailor-made" according to the eyes of the myopic person, once the ICL is implanted in the eye, it is easy to be accepted by the human body, and others or the surgeon himself can neither see nor feel the lens. All intraocular lenses implanted in the eye can be tubed for a lifetime.

12 answers2024-03-11

OK. Unilateral essential oils can not be directly smeared on the **, so they should be blended or mixed into skin care products together, compound essential oils are already mixed with base oil, most of them can be directly rubbed on **, or they can be mixed with skin care products. >>>More