> I'd like to use an automated "unwrap" feature.  Does such a
> thing exist in vim?  Or a unix/linux command primitive I can
> integrate (similar to the way I use 'map v {!}fmt^M' to fix
> paragraph wrap while I'm editing them?

If I understand what you're doing, if you have your 'textwidth' property set to
what you want, you can use

        gqip

to reformat the paragraph you're currently sitting on. This should work on platforms that don't have "fmt" available.

> Even better, might vim include a programmable feature now or
> in the future to automatically make non-wrapped lines look
> like wrapped lines much like WYSIWYG editors do?

Well, Vim does offer the 'wrap' option

        :set linebreak wrap tw=0

Your lines should then visually wrap, but not have embedded line breaks.


If you want to join all the lines in a paragraph, you can use

        vipJ

or, if you want to do it over your entire document, you can do things like

        :g/^\s*\n.*\S/+norm vipJ

You can tweak that expression to find (or exclude) whatever you want.

Any of those should be mappable if you want.

If this doesn't do the trick, it might help to better explain what you're looking for it to do.

-tim






Reply via email to