2

vimmer.io — Line completion

 2 years ago
source link: https://vimmer.io/tip/line-completion
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.

Line completion

You can use <C-x> followed by <C-l> in insert mode to complete whole lines. This is useful if you know that the line you're currently typing exists in the document already, and you want to duplicate it here without finding and yanking it first.

Furthermore, subsequently typing <C-x><C-l> will complete the following lines, so you can keep hitting <C-x><C-l> to type in a bunch of lines as if by magic.

Give it a try in the editor. Start typing some text that is identical to the start of one of the existing lines at the bottom of the buffer, then keep hitting <C-x><C-l>.


Interested in more interactive Vim content?

✨ Learn more about vimmer.io


About Joyk


Aggregate valuable and interesting links.
Joyk means Joy of geeK