DEV Community

Yufan Lou
Yufan Lou

Posted on

Three Vim Features

To split a line at pattern:


<c-v>, or Ctrl-v, in terminal waits for the next character, and inserts it as a literal (verbatim). So upon pressing <cr> (carriage return a.k.a enter key), instead of executing the command, the literal carriage return character (would be shown as ^M) is inserted at the cursor, which is then replaced into the file.

^M is the caret notation of carriage return. Other control characters can be similarly inserted with their corresponding key in the caret notation. For example, cancel is ^Z, so to insert it type


To copy the whole file into clipboard:


To insert the content of a register, for example, clipboard:


Top comments (0)