Skip to content

Instantly share code, notes, and snippets.

@romainl
Last active March 19, 2023 07:27
Show Gist options
  • Save romainl/fc2c2889be3718e9e491ab1c525ec4de to your computer and use it in GitHub Desktop.
Save romainl/fc2c2889be3718e9e491ab1c525ec4de to your computer and use it in GitHub Desktop.
Insert the current line into the command-line

Insert the current line into the command-line

This is an intuitive command-line mode mapping to insert the current line.

It is no longer needed since 8.0.1787 because the feature is now built-in. See :help c_ctrl-r_ctrl-l.


My Vim-related gists.

if !has('patch-8.0.1787')
cnoremap <C-r><C-l> <C-r>=getline('.')<CR>
endif
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment