In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-02-25 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >
Share
Shulou(Shulou.com)05/31 Report--
This article mainly explains "what are the command modes of vi in linux". Interested friends may wish to have a look. The method introduced in this paper is simple, fast and practical. Let's let the editor take you to learn what command modes vi has in linux.
Vi in linux is a text mode editor, which can only edit characters, but not typesetting fonts and paragraphs. Vi editor can either create or edit files. There are three command modes: Command, Insert and Visual.
The operating environment of this tutorial: linux7.3 system, Dell G3 computer.
What is vi in linux
Vi is a text editor developed by Bill 喜悦 of the University of California, Berkeley.
There are many text editors, such as gedit, kwrite, OpenOffice in graphic mode, and vi and vim (an enhanced version of vi) in text mode. Vi and vim are our most commonly used editors in Linux. Vi or vim is the most basic text editing tool of Linux. Although vi or vim is not as simple as the mouse click operation of the graphical interface editor, the vi editor can never be compared with the graphical interface editor in the system management and server management character interface.
Note: vi is the most classic text editor in the unix/linux operating system, it can only edit characters, not typography of fonts and paragraphs; it can either create or edit files; it has no menu, only commands, and many commands.
Although vi operates very differently from other commonly used text editors such as gedit, it is still used frequently because it runs in a character interface and can be used in all unix/linux environments.
Three Command modes of vi
Command (command) mode for entering commands
Insert (insert) mode for inserting text
Visual (visual) mode for visual highlighting and text selection
1. Command mode:
Command mode is the working mode that is entered after starting vi, and can be converted to text editing mode and last line mode. In command mode, any characters entered from the keyboard are interpreted as editing commands and are not displayed on the screen. If the character entered is a valid vi command, vi will complete the corresponding action; otherwise, vi will ring a warning.
two。 Text editing mode:
Text editing mode is used for character editing. Enter I (insert command), a (additional command) and other commands in command mode and enter text editing mode. At this time, any characters entered are displayed on the screen as file content by vi. Press ESC to return to command mode from text editing mode.
3. Last line mode:
In command mode, press the ":" key to enter the last line mode, and vi will display the ":" symbol year at the bottom of the screen as a prompt for the last line mode, waiting for the user to enter the relevant command. After the command is executed, vi automatically returns to command mode.
At this point, I believe you have a deeper understanding of "what command modes are available in vi in linux?" you might as well do it in practice. Here is the website, more related content can enter the relevant channels to inquire, follow us, continue to learn!
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.