Tuesday, October 13, 2015

Invoking Ruby script for selected range in Vimscript...

Hey Guys,

When I attempt to invoke a Ruby script (within a Vimscript) over a selected range, my Rubyscript gets invoked once for each line in the selected range. This is the documented behavior:

:[range]rubyd[o] {cmd} Evaluate Ruby command {cmd} for each line in the
[range], with $_ being set to the text of each line in
turn, without a trailing <EOL>. Setting $_ will change
the text, but note that it is not possible to add or
delete lines using this command.
The default for [range] is the whole file: "1,$".


Is it possible to bypass this behavior and have my Ruby script invoked just once?

Any suggestions would be welcome.

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