Greetings from a guy living in Argentina and a user of vi. 
I  never imagine I could do that with vi.
 I always cut and paste to insert a figure..... you give me a lot of 
ideas...... This helper scripts are very cool..... 
Even to edit a source code (may be fortran or c or whatever) is very 
usefull..... ! May be to create a IF THEN ELSE skeleton to use... 

THANKS!!!!!!!
ALF


El Lun 08 Abr 2002 11:51, escribiste:
> Not built in, true, but I do almost all my documentation in vi/TeX. One
> nice thing about vi is that you can filter sections of text through
> external programs, or read directly from the stdout of any program. This
>
> allows me to format a section of text by doing (trivial example):
>  :10,50! fmt
>
> For TeX code I've created a bunch of little helper scripts to do things
> like plug in an image or format columns. E.g.:
>
>
>     #/bin/sh
>       # epsinsert
>     GEOMETRY=`grep -A1 "% Image geometry" $1|tail -1`
>     # echo $GEOMETRY
>     WIDTH=`echo $GEOMETRY|cut -d' ' -f1`
>     HEIGHT=`echo $GEOMETRY|cut -d' ' -f2`
>
>     echo \\begin\{figure\}[label]
>     echo \\centering
>     echo \\includegraphics[height=${HEIGHT}pt,width=${WIDTH}pt]{$1}
>     echo \\caption\{ CAPTION \}
>     echo \\label\{label\}
>     echo \\end\{figure\}
>
> This can be called with:
>   :r! epsinsert images/somefile.eps


Want to buy your Pack or Services from MandrakeSoft? 
Go to http://www.mandrakestore.com

Reply via email to