In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-03-29 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >
Share
Shulou(Shulou.com)06/02 Report--
This article to share with you is about vim editor of several modes, Xiaobian think quite practical, so share to everyone to learn, I hope you can read this article after some harvest, not much to say, follow Xiaobian to see it.
Vim is a text editor developed from vi. Code completion, compilation and error jumping are particularly rich in convenient programming features, and are widely used by programmers, ranking alongside Emacs as the favorite text editor for Unix-like system users.
The vim design concept is a combination of commands. Users who learn a variety of move/jump commands between text and other normal mode editing commands, and can flexibly combine them, can edit text more efficiently than editors without modes. At the same time, VIM is similar to many shortcut key settings and regular expressions, which can assist memory. And vim is optimized for programmers.
Vim's model
1, Vim common mode.
Command-mode
insert-mode
Visual-mode
Normal-mode
2 How to enter these modes
①. normal mode
Normal mode is mainly used to browse and modify text content
In general, opening Vim is normal mode. In any mode, simply press Esc to return to normal mode.
②. insert mode
Insert mode is used to add content to text
i Start typing before the cursor character and enter insertion mode
a Start typing after the cursor character and enter insert mode
o (letter o) opens a new line below the cursor line to enter text and enter insertion mode
s deletes the cursor character and enters insert mode
I Start typing at the beginning of a line and enter insertion mode. This line begins with the first non-white space character. If there is a space at the beginning of the line, enter the text after the space and enter insert mode
A Start typing at the end of the line and enter insertion mode. This is easy to use, you don't care where the cursor is in this line, just press A will wait for you to enter text at the end of the line.
O (capital O) Opens a new line above the cursor line to enter text and enter insertion mode.
S Delete cursor row and enter insert mode
③ Visual mode
Visual mode is equivalent to normal mode with text highlighted.
Visual mode has sub-modes, visible row mode for selecting in rows, entered with the "V" key (i.e. Shift+v), and visible block mode for selecting in blocks, entered with the "Ctrl+v" key.
④ Command mode
Command mode is used to manipulate text files (rather than the contents of text files), such as saving files, or to change the state of the editor itself, such as setting multi-column windows, tabs, or exiting the editor
The above are several modes of vim editor, Xiaobian believes that some knowledge points may be seen or used in our daily work. I hope you can learn more from this article. For more details, please 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: 209
*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.