/etc/vim/vimrc overrides user .vimrc settings

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


--6TrnltStXW4iwmi0
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
>=20
>=20
> In trying to disable the maddening C language indentation (the LPC langua=
ge
> also uses .c, unfortunately, and they are not the same), I found that reg=
ardless
> 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.
>=20
> The ONLY way I could solve this (before my frustration level caused a key=
board
> to become injured) was to move /etc/vim/vimrc aside and copy the parts I =
wanted
> into my own .vimrc file.  That worked, but is hardly optimal.
>=20
> IMHO (and the author of vim as well, if reading the documentation is any =
indication)
> 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.

cheers,
--=20
=B7O=B7  Pierre Habouzit
=B7=B7O
OOO                                                http://www.madism.org

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

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.5 (GNU/Linux)

iD8DBQFCNpfMvGr7W6HudhwRAqviAJ92+72kteTZY5ddq9WAnhgua+MZZQCeO0FE
vJxacPYBam5G5YCdrJMsBLs=
=DkmT
-----END PGP SIGNATURE-----

--6TrnltStXW4iwmi0--