Visual mode of VIM

Source: Internet
Author: User

To facilitate Text Selection, VIM introduces the visual mode.To select a text segment, first move the cursor to the beginning of the segment, press V in normal mode to enter the visible mode, and then move the cursor to the end of the segment. Note that the character of the cursor is included in the selection area. In this case, you can perform some operations on the selected text,Common (visual mode) Commands include:
X or d cut (that is, delete, and the selected text enters the clipboard)
Y Replication
Replace all characters of the r character with new characters
U ~ All letters are written less, capitalized, and case-insensitive.
>
After the command is entered, VIM will return to normal mode. You can press P or P to paste it. Commands for copying and pasting in Normal Mode:
V enters the visual mode
P or P paste the content of the clipboard at the current position. P sticks to the character behind the cursor, and P sticks to the front.
I have to admit that although the visual mode is introduced, copying and pasting in VIM is still troublesome, which may be the only drawback of vim. :-) In addition, VIM also introduced the select mode, similar to the visual mode. With some key definitions and option settings, you can achieve the same copy and paste usage habits as Notepad. The length and level are limited.

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.