On 06/12/06, Karsten Gerloff <[EMAIL PROTECTED]> 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?
I find that the easiest way is to set tw to whatever you want it to be, write the text and then (just before pasting into OpenOffice): :set tw=10000 gggqG gg"+G To reformat the text with long lines. Assuming formatoptions is set to something sensible, this works a treat. Hope that helps, Al
