71348Re: set textwidth=80 and c mode
- Jul 15, 2006Paul Drynoff wrote:
> Hello.In C code, reformatting normally happens only within comments, because
> I for long time used vim with mutt,
> like this:
> set editor="vim +':set textwidth=60' %s"
> at now I need the same functionality for "C" files.
> but all looks like that textwidth is ignoring by vim, when "C mode" is on.
> may be there is similar option, but for "C mode"?
auto-reformatting long statements or conditions (breaking lines in them)
could be awkward, and even in some cases it could, IIUC, introduce
syntax errors. It could certainly make the code less readable by
breaking lines at places not reflecting its "logic". See
BTW (and after reading some more of this thread), I recommend adding
at the top of your vimrc. That script sets lots of useful settings. If
it does sompething you don't like, you can always override it later in
- << Previous post in topic