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.