Skip to content

Allow c_^R^L to insert current line to cmdline#2857

Closed
andymass wants to merge 1 commit intovim:masterfrom
andymass:master
Closed

Allow c_^R^L to insert current line to cmdline#2857
andymass wants to merge 1 commit intovim:masterfrom
andymass:master

Conversation

@andymass
Copy link

@andymass andymass commented May 1, 2018

Problem: There is no easy way to insert the current line into the cmdline like with current word and filename.
Solution: Add c_^R^L to insert the current line.

I often want to do this and am surprised it isn't provided along with c_^R^W, c_^R^F, etc. It's useful when processing a list of items or shell commands. Of course, I have the mapping

cnoremap <c-r><c-l> <c-r>=getline('.')<cr>

which works almost the same. This change would be a simple and useful addition to vim.

@codecov-io
Copy link

Codecov Report

Merging #2857 into master will decrease coverage by <.01%.
The diff coverage is 85.71%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #2857      +/-   ##
==========================================
- Coverage   75.44%   75.43%   -0.01%     
==========================================
  Files          92       92              
  Lines      134829   134834       +5     
==========================================
- Hits       101721   101715       -6     
- Misses      33108    33119      +11
Impacted Files Coverage Δ
src/ex_getln.c 73.27% <100%> (ø) ⬆️
src/ops.c 79.35% <80%> (ø) ⬆️
src/message.c 74.59% <0%> (-0.25%) ⬇️
src/if_xcmdsrv.c 84.17% <0%> (-0.18%) ⬇️
src/term.c 59.62% <0%> (-0.16%) ⬇️
src/ex_cmds2.c 78.58% <0%> (-0.1%) ⬇️
src/gui_gtk_x11.c 47.73% <0%> (-0.05%) ⬇️
src/if_py_both.h 76.59% <0%> (-0.01%) ⬇️
src/gui.c 47.78% <0%> (ø) ⬆️
src/syntax.c 78.28% <0%> (+0.02%) ⬆️
... and 1 more

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update b2ac14c...f5e4578. Read the comment docs.

@brammool brammool closed this in e2c8d83 May 1, 2018
adizero pushed a commit to adizero/vim that referenced this pull request May 19, 2018
Problem:    Cannot insert the whole cursor line.
Solution:   Make CTRL-R CTRL-L work. (Andy Massimino, closes vim#2857)
janlazo added a commit to janlazo/neovim that referenced this pull request Aug 17, 2018
Problem:    Cannot insert the whole cursor line.
Solution:   Make CTRL-R CTRL-L work. (Andy Massimino, closes vim/vim#2857)
vim/vim@e2c8d83
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants