Page 2 of 2
Re: vimrc disable auto-wrap
Posted: 30. Sep 2011, 14:17
by mimosa
I just tested it and it doesn't seem to affect the behaviour of vim when called as alternate editor by alpine; so I'm assuming alpine has some settings suitable for email that overrride whatever's in .vimrc. However, when vim is called directly, the modification works as described. That might not always be ideal, though I can certainly see that for some things it's much better than the existing default - particularly coding.
Supposing I want to define linewrapping at X characters, is it like this:
... and is that the same as the existing default behaviour? In particular, the insertion of linebreaks, which might cause problems when you open your file with another editor?
I wonder how the options we're discussing play out in GVim. (I take it it bases its behaviour on .vimrc too.)
Re: vimrc disable auto-wrap
Posted: 30. Sep 2011, 20:57
by pwatk
mimosa wrote:I just tested it and it doesn't seem to affect the behaviour of vim when called as alternate editor by alpine; so I'm assuming alpine has some settings suitable for email that overrride whatever's in .vimrc. However, when vim is called directly, the modification works as described. That might not always be ideal, though I can certainly see that for some things it's much better than the existing default - particularly coding.
Supposing I want to define linewrapping at X characters, is it like this:
Yes
... and is that the same as the existing default behaviour?
Yes
In particular, the insertion of linebreaks, which might cause problems when you open your file with another editor?
Um, well other editors won't see those breaks so no.
We could just use
set textwidth=0 which would keep everything on one line without any breaks. At least this would remove the annoying margin.
I wonder how the options we're discussing play out in GVim. (I take it it bases its behaviour on .vimrc too.)
AFAIK Gvim will observe the options set in the .vimrc but don't quote me.
Re: vimrc disable auto-wrap
Posted: 5. Oct 2011, 17:49
by JRD
pwatk wrote:AFAIK Gvim will observe the options set in the .vimrc but don't quote me.

Yes it will.
I vote also for having this options by default.
for the "showbreak" content, whatever you find it ok is ok for me.
A bit off topic, but could "modeline" be also added to the standard default options ?
It's a option that say to parse modelines at start of files like :
Code: Select all
$ cat myfilewithweird.extension
# vim: syn=sh
echo "in fact it's a sh script"
Open this file with vim (or gvim) with a "set modeline" in .vimrc and you will have the correct syntax highlight.
I use this always. It's very convenient for some files with non-standard extension. The syntax of the modeline could vary a lot and adapt to any language.