Thursday, October 26, 2017

Re: recommendation for a function over the entire buffer

On 2017-10-26 21:12, Jose Caballero wrote:
> Quick question: when using the :g command, can I call a plugin
> function? Like
>
> :g/<pattern>/:call AFunction()

Yes (that 2nd colon is optional). It would require the function to
context-aware with regards to the current line, but otherwise, it
Should Work™. Other than a second :g or :v command, I believe any Ex
command (or chain of "|"-separated commands) can follow
the :g/pattern/ so :call certainly qualifies.

-tim



--
--
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