FS#41616 - [vim] Change to system vimrc location

Attached to Project: Arch Linux
Opened by KaiSforza (KaiSforza) - Monday, 18 August 2014, 21:28 GMT
Last edited by Thomas Dziedzic (tomd123) - Wednesday, 20 August 2014, 02:04 GMT
Task Type Bug Report
Category Packages: Testing
Status Closed
Assigned To Thomas Dziedzic (tomd123)
Architecture All
Severity Low
Priority Normal
Reported Version
Due in Version Undecided
Due Date Undecided
Percent Complete 100%
Votes 4
Private No

Details

Description:

In the most recent revision of the vim packages, there were some sed lines removed (630c823b1b31e7 ¹). These set the system vimrc file to /etc/vimrc. At the moment, the system vimrc is set to $VIM/vimrc, which goes to /usr/share/vim/vimrc. If you start up vim like this then you do not get any of the arch defaults set from archlinux.vim.


Additional info:
* package version(s)
vim-7.4.408-1
* config and/or log files etc.

Current output:

[root@btrfs-chroots-root ~]# vim --version
VIM - Vi IMproved 7.4 (2013 Aug 10, compiled Aug 16 2014 23:25:45)
Included patches: 1-408
Compiled by Arch Linux
system vimrc file: "$VIM/vimrc"
user vimrc file: "$HOME/.vimrc"
2nd user vimrc file: "~/.vim/vimrc"
user exrc file: "$HOME/.exrc"
fall-back for $VIM: "/usr/share/vim"

Expected output:
wgiokas@wst420:~/git/KaiSforza/aur-old/vcs/vim-hg % vim --version
VIM - Vi IMproved 7.4 (2013 Aug 10, compiled Aug 18 2014 15:43:33)
Included patches: 1-410
Compiled by Arch:kaictl
system vimrc file: "/etc/vimrc"
user vimrc file: "$HOME/.vimrc"
2nd user vimrc file: "~/.vim/vimrc"
user exrc file: "$HOME/.exrc"
fall-back for $VIM: "/usr/share/vim"

Steps to reproduce:

# pacman -S testing/vim
$ vim --version | grep system

https://projects.archlinux.org/svntogit/packages.git/commit/trunk?h=packages/vim&id=630c823b1b31e7e1b74888091220aab4ffd8ded5
This task depends upon

Closed by  Thomas Dziedzic (tomd123)
Wednesday, 20 August 2014, 02:04 GMT
Reason for closing:  Fixed
Additional comments about closing:  fixed in vim 7.4.410-1 in [testing]
Comment by KaiSforza (KaiSforza) - Monday, 18 August 2014, 21:30 GMT
The specific lines changed in that commit:

- # define the place for the global (g)vimrc file (set to /etc/vimrc)
- sed -i 's|^.*\(#define SYS_.*VIMRC_FILE.*"\) .*$|\1|' \
- vim-build/src/feature.h
- sed -i 's|^.*\(#define VIMRC_FILE.*"\) .*$|\1|' \
- vim-build/src/feature.h
Comment by Mike Hicklen (Six) - Monday, 18 August 2014, 21:32 GMT
Issue manifests with HOME and END keys printing 'H' and 'F' and cursor keys printing 'A' 'B' 'C' 'D'. Makes navigation outside of $^HJKLgG tough.
Comment by Anatol Pomozov (anatolik) - Tuesday, 19 August 2014, 08:24 GMT
> Issue manifests with HOME and END keys printing 'H' and 'F'..

I see the same issue. Current workaround is to add "set nocompatible" to your ~/.vimrc
Comment by KaiSforza (KaiSforza) - Tuesday, 19 August 2014, 19:37 GMT
> I see the same issue. Current workaround is to add "set nocompatible" to your ~/.vimrc

Best fix would be to add

runtime! archlinux.vim

into either $HOME/.vimrc or $HOME/.vim/vimrc. (That's all the /etc/vimrc file really does)
Comment by Thomas Dziedzic (tomd123) - Wednesday, 20 August 2014, 02:03 GMT
Thanks for the bug report, as suggested by William, I added those lines back into the PKGBUILD to fix the issue.

You should remove any workarounds you've been using thus far and use vim 7.4.410-1 in [testing]

Loading...