ben lieb wrote:
Greetings Vim Users! This is my first post, so Hello all from North
Carolina!
I have decided to write some perl filters for vim, but was disappointed
that it seems I can only filter WHOLE LINES (and not selected parts of
lines). Is this true?
I found that...
:'<,'>!my_filter.pl
...is given the whole line, even when only two words in the middle of
the line are selected. Is there any way to send only parts of lines and
not the whole line(s).
Thanks in advance for any and all help, and since this is my first post,
I want to say a big THANK YOU to all those in the vim dev community for
maintaining such a powerful tool!
Filters are line-oriented.
If you want to give only part of a line (or a blockwise visual selection,
which is part of several lines) to a filter, one possible workaround is to
extract whatever you want to filter to a temporary buffer and filter that.
Best regards,
Tony.