On 2007-04-22, [EMAIL PROTECTED] wrote:
> Hi,
>
> Suppose I have a text like this (:set list)
>
> Hello $
> this $
> is$
> a $
> text with $
> spaces $
>
> and want it to become this one:
>
> Hello =
> this =
> is =
> a =
> text with =
> spaces =
>
> . I tried different cpoptions combined with
> blcok-seelcting in visual mode, but I failed
> and ended up adding spaces by hand in each line,
> which isn't efficent that much ;)
>
> I set virtualedit=block.
>
> What do I have to tell vim that it will recognize
> missing spaces and add it according to a block
> select?
What I would do is this:
- set ve=all
(ve=block may work, but the only two 've' settings I ever use
are "" and "all".)
- Move the cursor to the first line and the column where you
want your =s.
- Type
Ctrl-V
- Type j enough times to highlight the column down to the last
line.
- Type
r=
You might also look at Dr. Chip's Align plugin for such tasks as
aligning all the =s in a block of assignments to the same column.
HTH,
Gary
--
Gary Johnson | Agilent Technologies
[EMAIL PROTECTED] | Mobile Broadband Division
| Spokane, Washington, USA