Arch Linux

Please read this before reporting a bug:
https://wiki.archlinux.org/title/Bug_reporting_guidelines

Do NOT report bugs when a package is just outdated, or it is in the AUR. Use the 'flag out of date' link on the package page, or the Mailing List.

REPEAT: Do NOT report bugs for outdated packages!
Tasklist

FS#9037 - vim sticks example configuration in place for global configuration

Attached to Project: Arch Linux
Opened by Magnus Therning (magus) - Friday, 28 December 2007, 17:45 GMT
Last edited by Tobias Kieslich (tobias) - Thursday, 07 February 2008, 20:27 GMT
Task Type Bug Report
Category Packages: Extra
Status Closed
Assigned To Tobias Kieslich (tobias)
Architecture All
Severity Low
Priority Normal
Reported Version 2007.08-2
Due in Version Undecided
Due Date Undecided
Percent Complete 100%
Votes 1
Private No

Details

Description:

Package vim puts an example configuration file in /etc/virc. Its existance is /very/ irritating due to the load order of configuration files in vim; it's loaded /after/ the user's own configuration.

Additional info:
extra/vim 7.1.156-1

Steps to reproduce:
Install the package
This task depends upon

Closed by  Tobias Kieslich (tobias)
Thursday, 07 February 2008, 20:27 GMT
Reason for closing:  Not a bug
Additional comments about closing:  not in vim anyway
Comment by Magnus Therning (magus) - Friday, 28 December 2007, 17:47 GMT
Oups, the file is of course /etc/vimrc
Comment by Tobias Kieslich (tobias) - Thursday, 10 January 2008, 19:19 GMT
I did a little testing, and ~/.vimrc is read after! /etc/vimrc, hence everything in ~/.vimrc has the final say and overwrites defaults from /etc/vimrc
/etc/vimrc is explicitely treated as systemwide vimrc (see output of vim --version) so vim will always treat ~/.vimrc with higher priority.
Yes, the file we install there is an example file, but the settings reflect the recommendation from the upstream author AND make vim more usable out of the box.
Comment by Roman Kyrylych (Romashka) - Thursday, 10 January 2008, 23:37 GMT
I've closed  FS#9038  which is the same but for vi.
Comment by Tobias Kieslich (tobias) - Tuesday, 15 January 2008, 02:08 GMT
this implied a question actually, how does /etc/vimrc overwrites ~/.vimrc for the reporter? I can't reproduce it, however, it's claimed to happen.
Comment by Michael Fearon (chimaera_felon) - Friday, 18 January 2008, 01:12 GMT
I'm having the same problem. Just installed Vim on a fresh install of Arch. Then;
cp /usr/share/vim/vimrc_example.vim ~/.vimrc

added set background=dark to .vimrc
This didn't have any effect.
:set background=dark from within vim did.
After seeing this bug report I edited /etc/virc with set background=dark
This worked.
After a bit of playing round I realised that if I renamed my .vimrc to .virc it works.
This creates a problem though. Vim doesn't provided syntax highlighting for .virc only .vimrc.
vi --version shows the problem (these two lines of output show the problem);

system vimrc file: "/etc/virc"
user vimrc file: "$HOME/.virc"

Surely these should be set to vimrc not virc. Vi and Vim are two different programs. The root of the bug perhaps?

Hope this was helpful. First time I've filed a bug report. Let me know if I've screwed up in any way.
Thanks for your time :)
Comment by Michael Fearon (chimaera_felon) - Friday, 18 January 2008, 01:41 GMT
UPDATE: Yes, I have screwed up!

The confusion arises when installing arch. The vi editor is downloaded in the base packages. Later on however you are given the option of using either nano or VIM! This is slightly misleading as it led me to believe I had installed vim on my system.

This confusion is compounded by the vim configuration files that are also installed. Though I suppose the fact I had to call vi to use vim should have given me a clue! :(

Perhaps it is usual to have the vim configuration files for use with vi? I think the next release of the Arch installer needs to be more clear though. Should I file bug report in this regard?

Sorry for wasting your time.
Thanks again.
Comment by Tobias Kieslich (tobias) - Friday, 18 January 2008, 02:59 GMT
sounds good to me (the other bug report)
vi vim and gvim are split up this way to have a clear distinction between the functionality AND have the runtime served by only one package.
since the vi package is not as capable (no highlight etc), we need clear distinction for the config files since vi errors out on uknown more sophisticated config values.
I think it is just fair to rename the file in the installer.
Comment by Roman Kyrylych (Romashka) - Friday, 18 January 2008, 08:15 GMT
Michael, file a bug report in Installation category please.
Comment by Michael Fearon (chimaera_felon) - Friday, 18 January 2008, 09:57 GMT
Done.  FS#9249 .
Thanks again guys :)

Loading...