Hello Benji, 

thank you for your suggestion. The script of Dr.C is seems to be a very 
powerful tool
for various align-tasks. I tested it for half an hour and I'm really enlighted.

For those who are interested, I'll give a short report on what I tried with my 
sample file (see below)
It is possible to align blocks relatively to a separator (it would be the "-") 
so the "-" appears in every line at the same position.
I do not know wether you can tell the script the absolute position of a 
seperator, but this is not substantial for me since you can move text blockwise.
The seperator can also be a reg. expression:  E.g. I tried to have a "[0-9]" as 
a seperator - 
that aligned a selected block relatively to the numbers in each line (in the 
example, 0 or 1 or 0.5 [playing chess 8-)] ).     

Thanks Dr. C. for this script! 

best regards, 

Dan

>      I have not tried it myself, but I think that Dr. C's Align.vim
> plugin is designed for just this sort of task:
> 
> http://www.vim.org/scripts/script.php?script_id=294
> 
> HTH                                   --Benji Fisher


> On Mon, May 15, 2006 at 03:19:46PM +0200, Popovic Dan wrote:
> > Hello dear list-members,
> > 
> > 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:
> > 
> > ------------------------------------------------------
> > 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 played with some search & replace commands, for example:
> > 
> > :%s/^\([A-Z][a-z]* \)/\1    /  
> > 
> > But I do not know how to tell VIM that it should fill the room with 
> > whitespaces till position 15 (like above).  
> > I'm convinced this is possible but I do not know how, since I just began to 
> > learn the powerful regex-functionality....
> 


--                                                  
Dan Popovic 
Klausenpfad 22; 69121 Heidelberg 
[EMAIL PROTECTED]; Tel. 06221/7282102 oder 01743036428
http://www.rzuser.uni-heidelberg.de/~dpopovi2/index.html
_______________________________________________________________
SMS schreiben mit WEB.DE FreeMail - einfach, schnell und
kostenguenstig. Jetzt gleich testen! http://f.web.de/?mc=021192

Reply via email to