On 2007-04-24, [EMAIL PROTECTED] wrote:
> Hi,
>
> A similiar problem I had was solved previously. Now
> I got stuck in the "advanced version" of this. Suppose
> I have the following text (:set list) :
>
>
> ljdh $
> laskjdl $
> sdj $
> aslkdjldjlad$
> a $
> askdj $
> askdjlsd $
> aks $
> lkasjdsdjlllljadl $
>
> and I want this with less plugins, keystrokes, function
> definitions etc as possible....
>
> ljdh = spacequest( vim, text );$
> laskjdl = spacequest( vim, text );$
> sdj = spacequest( vim, text );$
> aslkdjldjlad = spacequest( vim, text );$
> a = spacequest( vim, text );$
> askdj = spacequest( vim, text );$
> askdjlsd = spacequest( vim, text );$
> aks = spacequest( vim, text );$
> lkasjdsdjlllljadl = spacequest( vim, text );$
>
> I (with set ve=all or set ve=block) to marked a column
> with a visual block and tried "r" (which works "only" for
> one character to be inserted) and R (which kills ALL my
> text).
>
> How can I solve this problem ?
This particular case of all the added text being the same is pretty
easy to solve. Start the way you did before, by typing Ctrl-V and
highlighting a column. Then instead of typing 'r' to replace a
single character, type 's' to substitute the selected text with an
arbitrarily-long string and follow the 's' with
= spacequest( vim, text );
and finish by typing <Esc>. See
:help visual-operators
for more operations you can perform on visually-selected areas.
Regards,
Gary
--
Gary Johnson | Agilent Technologies
[EMAIL PROTECTED] | Mobile Broadband Division
| Spokane, Washington, USA