ArchThis Forum is for the discussion of Arch Linux.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
bill@darkstar~/work2$ cat /etc/vimrc
" All system-wide defaults are set in $VIMRUNTIME/archlinux.vim (usually just
" /usr/share/vim/vimfiles/archlinux.vim) and sourced by the call to :runtime
" you can find below. If you wish to change any of those settings, you should
" do it in this file (/etc/vimrc), since archlinux.vim will be overwritten
" everytime an upgrade of the vim packages is performed. It is recommended to
" make changes after sourcing archlinux.vim since it alters the value of the
" 'compatible' option.
" This line should not be removed as it ensures that various options are
" properly set to work with the Vim-related packages.
runtime! archlinux.vim
" If you prefer the old-style vim functionalty, add 'runtime! vimrc_example.vim'
" Or better yet, read /usr/share/vim/vim80/vimrc_example.vim or the vim manual
" and configure vim to your own liking!
" do not load defaults if ~/.vimrc is missing
"let skip_defaults_vim=1
set backup
syntax off
bill@darkstar~/work2$
However, I still have syntax highlighting. Possible cause?
Neither /etc/vimrc nor /usr/share/vim/vimrc is taken notice of by vim. It only reads ~/.vimrc. How can it be? I want to have a global vimrc.
Normally the path is compiled IN your copy of VIM, so it is dependant on your distribution of Linux, but you can set the environment variable VIM to /usr/share/vim and it will use the vimrc IN that directory (if your maintainer compiled that option into vim).
My version has
Code:
system vimrc file: "
$VIM/vimrc
user vimrc file: "
$HOME/.vimrc
My bad, that was unclear. I knew what I was talking about, but you'd have to be clairvoyant. If you have a ~/.vimrc in your /etc/skel, every new user would get one.
The /etc/skel .vimrc is only passed top NEW users you add from now on. You have top sort any existing users yourself, like root. I tried to make that clear.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.