[lug] vi macro for paragraph justification
Chip Atkinson
catkinson at circadence.com
Wed May 30 08:23:52 MDT 2001
Use the fmt command and apply it to a paragraph. I do this all the time.
From "navigation mode" in vi:
!}fmt
The } means from the cursor to the end of the paragraph. You can also
do it from the ed command line like so:
:1,$!fmt
which will run the entire document (line 1 to the last line, $) through
the fmt program.
You can also do similar things such as sorting like so:
:25,56!sort -nr
which sorts lines 25 through 56 in reverse (-r) numerical (-n) order.
Chip
Rick Casey wrote:
> Does anyone know of a vi macro for paragraph justification?
> One would think this would be easy to find, but searching the net came up
> short...
>
> TIA,
> --rick
>
> _______________________________________________
> Web Page: http://lug.boulder.co.us
> Mailing List: http://lists.lug.boulder.co.us/mailman/listinfo/lug
More information about the LUG
mailing list