1, display line number: Setnumber
2, cancel the line number; Setnonumber
3, in normal mode (press ESC to enter) The key v into the visual mode, and then press the keyboard or h,l key to achieve the text selection.
Other Related commands:
V: Select by character. Often use the pattern, so try it out for yourself.
V: Select by row. This is especially useful when you want to copy or move a lot of lines of text.
CTRL + V: SELECT by block. Very powerful, only in a few editors have such a function. You can select a rectangular block, and the text inside the rectangle will be highlighted.
It is important to note that if you use auto-wrap in vim, VIM will treat your previous input as a row instead of several lines you see, until you press ENTER, and then select the block by the line in Vim when you press block.
Use the arrow keys and commands (motion) described above when selecting the mode. For example, VWWW will highlight the three words in front of the cursor. VJJ will highlight the current row and the following two lines.
4, y copy, p paste
Vim copy operation