[vim/vim] Add support for line continuation when executing a register using :@ command (#6272)

16 views
Skip to first unread message

Yegappan Lakshmanan

unread,
Jun 15, 2020, 6:49:11 PM6/15/20
to vim/vim, Subscribed

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.


You can view, comment on, or merge this pull request online at:

  https://github.com/vim/vim/pull/6272

Commit Summary

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

File Changes

Patch Links:


You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub, or unsubscribe.

codecov[bot]

unread,
Jun 15, 2020, 7:16:00 PM6/15/20
to vim/vim, Subscribed

Codecov Report

Merging #6272 into master will increase coverage by 0.01%.
The diff coverage is 88.57%.

Impacted file tree graph

@@            Coverage Diff             @@

##           master    #6272      +/-   ##

==========================================

+ Coverage   87.49%   87.50%   +0.01%     

==========================================

  Files         143      143              

  Lines      158429   158463      +34     

==========================================

+ Hits       138617   138669      +52     

+ Misses      19812    19794      -18     
Impacted Files Coverage Δ
src/register.c 91.54% <88.57%> (-0.09%) ⬇️
src/if_xcmdsrv.c 88.73% <0.00%> (-0.18%) ⬇️
src/window.c 89.62% <0.00%> (-0.11%) ⬇️
src/sign.c 94.94% <0.00%> (-0.09%) ⬇️
src/message.c 88.59% <0.00%> (-0.05%) ⬇️
src/gui_gtk_x11.c 59.10% <0.00%> (+0.04%) ⬆️
src/gui.c 64.07% <0.00%> (+0.15%) ⬆️
src/os_unix.c 70.90% <0.00%> (+0.22%) ⬆️
src/netbeans.c 76.59% <0.00%> (+0.22%) ⬆️
src/profiler.c 93.03% <0.00%> (+0.55%) ⬆️
... 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 c70222d...34cd42d. Read the comment docs.

Yegappan Lakshmanan

unread,
Jun 15, 2020, 8:44:43 PM6/15/20
to vim/vim, Push

@yegappan pushed 1 commit.

  • e268822 Add a test for large number of lines


You are receiving this because you are subscribed to this thread.

View it on GitHub or unsubscribe.

Bram Moolenaar

unread,
Jun 16, 2020, 1:34:40 PM6/16/20
to vim/vim, Subscribed

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.

Yegappan Lakshmanan

unread,
Jun 16, 2020, 1:50:28 PM6/16/20
to vim_dev, reply+ACY5DGBPEKUNDI6ZFF...@reply.github.com, vim/vim, Subscribed
Hi Bram,

On Tue, Jun 16, 2020 at 10:34 AM Bram Moolenaar <vim-dev...@256bit.org> wrote:

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.



This will still be needed for executing pre-vim9 scripts from a register.

For example, many times when developing the test scripts, I needed this support
to copy a Vim script fragment and execute it. If the fragment had line continuation,
then I need to copy it to another buffer, remove the line continuation and then
yank it again and execute it.

Regards,
Yegappan

vim-dev ML

unread,
Jun 16, 2020, 1:50:45 PM6/16/20
to vim/vim, vim-dev ML, Your activity

Bram Moolenaar

unread,
Jun 16, 2020, 4:47:11 PM6/16/20
to vim/vim, vim-dev ML, Comment

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.


You are receiving this because you commented.

Yegappan Lakshmanan

unread,
Jun 17, 2020, 11:32:29 AM6/17/20
to vim/vim, vim-dev ML, Push

@yegappan pushed 1 commit.


You are receiving this because you are subscribed to this thread.

Bram Moolenaar

unread,
Jun 17, 2020, 3:47:52 PM6/17/20
to vim/vim, vim-dev ML, Comment

Closed #6272 via 856c111.


You are receiving this because you commented.

Reply all
Reply to author
Forward
0 new messages