vi and wrap text

parv parv_fm at emailgroups.net
Wed Oct 8 16:51:48 PDT 2003


in message <20031008170340.GA42240 at alexis.mi.celestial.com>, wrote
Bill Campbell thusly...
>
> Another one I use a lot in my ~.vimrc file is ``map <F5> {!}fmt''

So you add other arguments to pass to fmt (for carriage-return
character is missing).(?)


> which rewraps the current paragraph the cursor is in when I press
> the F5 key.

Do you find vim's internal wrapping functions to be inadequate?
Just curious.

In my case, "gq*" commands work just fine except when it comes to
putting each line, of a text block, in center.  Then i use...

   "  center block with in 68 columns
   nmap  <Esc>E  !}/usr/bin/fmt -c -68


> This maps the key sequence ``{!}fmt'' to the F5 key ``{'' top of
> paragraph, ``!'' execute command ``}'' to bottom of paragraph,
> ``fmt'' the command to execute.

For anybody else who is still reading, '<Esc>E' works as described
above except the formatting point is the line containing the current
position of the cursor.


  - Parv

-- 



More information about the freebsd-questions mailing list