vi, vim and gvim support ex level commands:
:set ws wm=10
which sets the transfer marker with 10 characters from the right border and forcibly performs the βwrappingβ - automatic packaging as you type. This will not work to insert text. To do this, there is the 'fmt' command, which is native to Unix / Linux and is provided on Cygwin and GnuWin32 (see How can I get functionality for Vim on Windows? ) ..
The fmt command provides a filter for reformatting existing text with word breaks and accepts a numeric flag (for example, "-80") to indicate the line width. You can call this from the vim editor after pasting in long lines.
You do:
!!fmt
reformat a long line (key combination for ex: ".! fmt" command)
Or, to redo the whole paragraph:
!}fmt
from the first line of the paragraph.
This should save some time.
blackcatweb
source share