On 5/15/06, Popovic Dan <[EMAIL PROTECTED]> wrote:
> I have a question on replacing text. I have a simple text-file with a table of results like this:
>
> ------------------------------------------------------
> Mosbach -   KSF 2                   2 : 6
>
> Zimmer        -   Pfrommer 0
> Mueller       -   Kargoll 1
> Schwab        -   Fecht 0
> Mattern       -   Arlt 0
> Huth -   Mueller 0
> Alm -   Kiefhaber,H.  0.5
> Rastert       -   Vinke 0
> Schnirch -   Kiefhaber,V.  0.5
>
> I would like to have the file formatted, e.g. first to have all the "-" in one column (for example at position 15), like this:...

Have you considered using the Align plugin for this purpose?

To align just the "-"s, a simple

   :[range]Align -

would do the trick.  To align the Zimmer..Schnirch "-"s and #.#s:

   :[range]Align - [0-9.]\+

would. Align is available at http://vim.sourceforge.net/scripts/script.php?script_id=294 .

Regards,
Chip Campbell


Reply via email to