Skip to content

Add support for line continuation when executing a register using :@ command#6272

Closed
yegappan wants to merge 2 commits into
vim:masterfrom
yegappan:execreg
Closed

Add support for line continuation when executing a register using :@ command#6272
yegappan wants to merge 2 commits into
vim:masterfrom
yegappan:execreg

Conversation

@yegappan
Copy link
Copy Markdown
Member

When executing register contents using the :@ command, currently line
continuation is not supported. This is very useful for testing VimScript
snippets by yanking the contents to a register and then executing it.

@codecov
Copy link
Copy Markdown

codecov Bot commented Jun 15, 2020

Codecov Report

Merging #6272 into master will increase coverage by 0.00%.
The diff coverage is 97.14%.

Impacted file tree graph

@@           Coverage Diff           @@
##           master    #6272   +/-   ##
=======================================
  Coverage   87.46%   87.47%           
=======================================
  Files         143      143           
  Lines      158557   158591   +34     
=======================================
+ Hits       138679   138720   +41     
+ Misses      19878    19871    -7     
Impacted Files Coverage Δ
src/register.c 91.77% <97.14%> (+0.13%) ⬆️
src/gui_gtk.c 31.05% <0.00%> (-0.28%) ⬇️
src/window.c 89.65% <0.00%> (-0.07%) ⬇️
src/gui_gtk_x11.c 58.70% <0.00%> (-0.05%) ⬇️
src/gui.c 63.32% <0.00%> (ø)
src/ex_getln.c 91.84% <0.00%> (+0.04%) ⬆️
src/testing.c 93.64% <0.00%> (+0.57%) ⬆️
src/mbyte.c 79.86% <0.00%> (+0.73%) ⬆️

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 f7d267e...e17e593. Read the comment docs.

@brammool
Copy link
Copy Markdown
Contributor

I'm wondering if this is really something we should encourage to be used. In a :def function it's now possible to omit the line continuation, especially for a list and dict. Why not use a :def function instead? It's not fully stable yet, but this pull request is also new.

@vim-ml
Copy link
Copy Markdown

vim-ml commented Jun 16, 2020 via email

@brammool
Copy link
Copy Markdown
Contributor

Hmm, OK. Would be good to add a remark in the help somewhere, with a hint that this is mainly for trying out a part of a Vim script, not for normal use.

@brammool brammool closed this in 856c111 Jun 17, 2020
zeertzjq added a commit to zeertzjq/neovim that referenced this pull request Feb 23, 2022
…ation

Problem:    Cannot execute a register containing line continuation.
Solution:   Concatenate lines where needed. (Yegappan Lakshmanan,
            closes vim/vim#6272)
vim/vim@856c111

According to neovim#2542 the "Future:" part was removed intentionally.
Use size_t in more places to reduce type casts.
zeertzjq added a commit to zeertzjq/neovim that referenced this pull request Feb 23, 2022
…ation

Problem:    Cannot execute a register containing line continuation.
Solution:   Concatenate lines where needed. (Yegappan Lakshmanan,
            closes vim/vim#6272)
vim/vim@856c111

According to neovim#2542 the "Future:" part was removed intentionally.
Use size_t in more places to reduce type casts.
zeertzjq added a commit to zeertzjq/neovim that referenced this pull request Mar 8, 2022
…ation

Problem:    Cannot execute a register containing line continuation.
Solution:   Concatenate lines where needed. (Yegappan Lakshmanan,
            closes vim/vim#6272)
vim/vim@856c111

According to neovim#2542 the "Future:" part was removed intentionally.
Use size_t in more places to reduce type casts.
zeertzjq added a commit to zeertzjq/neovim that referenced this pull request Mar 8, 2022
…ation

Problem:    Cannot execute a register containing line continuation.
Solution:   Concatenate lines where needed. (Yegappan Lakshmanan,
            closes vim/vim#6272)
vim/vim@856c111

According to neovim#2542 the "Future:" part was removed intentionally.
Use size_t in more places to reduce type casts.
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.

3 participants