[londonperl] vim question

Adrian Lai perl at loathe.me.uk
Wed Mar 26 01:35:02 GMT 2008


On 26/03/2008, David Alban <extasia at extasia.org> wrote:
> so you want to change colons to spaces only from 'b' to the end of the
>  line on line 2?
>
>  if this is the real task, and not a simple generalization of a larger
>  task, you could use ctrl-v to select the appropriate block and then
>  the s/// command would work within that block.   note that when a
>  block is highlighted and you type ':' the following actually shows up
>  on the "command" line at the bottom of the editing session:
>
>      :'<,'>
>
>  don't disturb that.  put your s/// command right after it and it
>  should operate on the highlighted block.

Actually this won't work (to my knowledge, could have changed in newer
versions of vim that I'm unfamiliar with).

But as far as I'm aware, ex commands operate on entire lines - even if
you don't have the entire line highlighted in your visual block.

Adrian.


More information about the london.pm mailing list