4 ms·
Pardon me for piggy-backing on your comment, but the Vim equivalent of Emacs's auto-fill mode is to `:set textwidth=74 wrap linebreak` (where 74 here is the col
by groovy2shoes 10y ago
Pardon me for piggy-backing on your comment, but the Vim equivalent of Emacs's auto-fill mode is to `:set textwidth=74 wrap linebreak` (where 74 here is the column at which to wrap, and `linebreak` tells Vim to break at some character specified in `breakat`, which is set to a useful default consisting of whitespace and various punctuation). The default behavior is the same as @compsciphd describes for Emacs: it won't reflow automatically during editing, however, the sequence `gqap` in command mode will reflow the current paragraph (`gq` is a command to format text, and it is followed by a motion to specify the text to format: in this case `ap` is the motion for "a paragraph", i.e., the paragraph which currently contains the cursor).
Vim also has an auto-format feature, which can be enabled with `:set formatoptions+=a` and will make paragraph editing behave a bit more like, say, a word processing program, but the Vim help file cautions that formatting long paragraphs or paragraphs with complicated indentation can get slow. I haven't really used the auto-format feature myself, so I can't comment on how slow it actually seems to be in practice.