Thursday, March 2, 2017

yanking a certain part of a line based on a regex (vim scripting)

Hi,

I want to yank a certain part of a line (the cursor is positioned
on that line) from the position of the cursor to the point of the
line where a certain regex matches into a register. The target positon
is positioned on the right.

"into a register" is not the problem here ;)

I thought of something like

:yt<regex>

but I didn't find a 't'-movement command, which allows a target
position defined by a regex.

Unfortunately a regex is needed here, since the target position cannot
be described with a single letter.

How can I acchieve this?

Thanks a lot for any help in advance!
Cheers
Meino




--
--
You received this message from the "vim_use" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php

---
You received this message because you are subscribed to the Google Groups "vim_use" group.
To unsubscribe from this group and stop receiving emails from it, send an email to vim_use+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

No comments:

Post a Comment