/etc/vim/vimrc overrides user .vimrc settings

Pierre HABOUZIT pierre.habouzit@m4x.org
Tue, 15 Mar 2005 09:07:40 +0100

Content-Type: text/plain; charset=iso-8859-1
Content-Disposition: inline
Content-Transfer-Encoding: quoted-printable

On Thu, Jun 17, 2004 at 04:31:25AM -0400, Dread Quixadhal wrote:
> Package: vim
> Version: 1:6.2-426+1
> Severity: normal
> In trying to disable the maddening C language indentation (the LPC langua=
> also uses .c, unfortunately, and they are not the same), I found that reg=
> of how many combinations of commands to disable all forms of indentation =
I put in
> my $HOME/.vimrc file, the one that turns it on in /etc/vim/vimrc override=
s me.
> The ONLY way I could solve this (before my frustration level caused a key=
> to become injured) was to move /etc/vim/vimrc aside and copy the parts I =
> into my own .vimrc file.  That worked, but is hardly optimal.
> IMHO (and the author of vim as well, if reading the documentation is any =
> the user's $HOME/.vimrc file should ALWAYS override everything else, shor=
t of
> environmental variables or actual command line flags... IE: it should
> be the LAST config file loaded, not the first.

  the Good SOlution is to put in your .vimrc :

  au FileType c set nocindent nosmartindent noautoindent

  btw, I can assure you that /etc/ files have lower priority that your
personnal dotfiles.  the things that are felt like beeing bad priorities
are often bad commands with bad syntax, that are also ignored by vim

  So please check (for the guifont part) that your setting line is
correct (if you use kvim, changing the guifont with the gui will give
you a vimrc line you only have to copy/paste in your .vimrc, thus
preventing you to forgot some \ before a space e.g.)

  If those informations helps you, please close the bug by sending a
mail to  254835-done AT bugs.debian.org

  If you show no response, I'll do it myself.

=B7O=B7  Pierre Habouzit
OOO                                                http://www.madism.org

Content-Type: application/pgp-signature; name="signature.asc"
Content-Description: Digital signature
Content-Disposition: inline

Version: GnuPG v1.2.5 (GNU/Linux)