In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-02-24 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >
Share
Shulou(Shulou.com)06/02 Report--
In this issue, the editor will bring you about the vim in Linux. The article is rich in content and analyzes and narrates it from a professional point of view. I hope you can get something after reading this article.
Vim is a text editor developed from vi. Code completion, compilation and error jump are particularly rich in convenient programming functions, which are widely used among programmers, and Emacs has become the favorite text editor for users of Unix-like systems.
Vim's design philosophy is a combination of commands. Users have learned a variety of text-to-text move / jump commands and other normal mode editing commands, and if they are able to combine them flexibly, they can edit text more efficiently than editors without patterns. At the same time, VIM is similar to many shortcut key settings and regular expressions to aid memory. And vim is optimized for programmers.
To put it simply, vi is an old-fashioned word processor, but it has a full range of functions, but there is still room for improvement. Vim can be said to be a very useful tool for program developers.
The use of vi/vim
Basically, vi/vim is divided into three modes: command mode (Command mode), input mode (Insert mode) and bottom line command mode (Last line mode). The functions of these three models are:
Command mode:
As soon as the user starts vi/vim, he enters command mode.
In this state, the keystroke action is recognized by Vim as a command rather than an input character. For example, if we press I at this time, we will not enter a character, I will be treated as a command.
Here are a few commonly used commands:
I switch to input mode to enter characters.
X deletes the character at the current cursor.
Switch to the bottom line command mode to enter the command on the bottom line
To edit the text: start Vim, enter command mode, press I, and switch to input mode.
Command mode has only some of the most basic commands, so you still have to rely on the bottom line command mode to enter more commands.
Input mode
Press I in command mode to enter input mode.
In input mode, you can use the following keys:
Character keystrokes and Shift combinations, input characters
ENTER, enter key, line break
BACK SPACE, Backspace key, delete the character before the cursor
DEL, delete key, delete one character after the cursor
Arrow keys to move the cursor in the text
HOME/END, move the cursor to the beginning / end of the line
Page Up/Page Down, turn the page up / down
Insert, switch the cursor to input / replace mode, and the cursor will become vertical / underlined
ESC, exit input mode, switch to command mode
Bottom line command mode
Press: (English colon) in command mode to enter the bottom line command mode.
The bottom line command mode can enter single or multiple character commands, and there are many commands available.
In the bottom line command mode, the basic commands are (the colon has been omitted):
Q exit program
W Save the file
Press the ESC key to exit the bottom line command mode at any time.
The above is the introduction of vim in the Linux shared by the editor. If you happen to have similar doubts, you might as well refer to the above analysis to understand. If you want to know more about it, you are welcome to follow the industry information channel.
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.