Karsten Gerloff wrote:
Hi,

I'm currently writing a lot of text in vim that will later need to
transfer to a word processor (OpenOffice 2.0 in this case).
Since it makes reading easier, I want to make lines wrap at 66
chars; this has long worked fine with

        set textwidth=66

But this inserts hard line breaks (<EOL>), which I don't want to
show up later in the word processor. No luck at vim.org. So I
tried the vim FAQ at
        http://vimdoc.sourceforge.net/vimfaq.html

and it told me to put the following into my .vimrc:

    :set wrap
    :set linebreak
    :set textwidth=0
    :set showbreak=>>>

which works nicely as far as the EOLs are concerned. But the lines
still run over the whole width of the screen. Setting textwidth=66
re-introduces the unwanted EOLs.

Any hints?
(yes, I know that this is wanting to have my cake and eat it too
-- but that's why I started using vim in the first place :-)

Thanks,
Karsten


In gvim, and in some but not all console terminals, you can use

        :set wrap linebreak textwidth=0 columns=66

in order to place the right margin of the screen where you want the lines to break.


Best regards,
Tony.

Reply via email to