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.
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
compiled into the executable.
Code:
root@darkstar~# cat /usr/share/vim/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
root@darkstar~# echo $VIM
/usr/share/vim
root@darkstar~#
Now if I run vim I still have color syntax highlighting. How do you explain it? My distro is arch.
Now if I run vim I still have color syntax highlighting. How do you explain it? My distro is arch.
I don't know anything about arch-linux, nor about their changes in the vim package (and startup files), so cannot help you there.
I use a "syntax off" in my personal .vimrc, do NOT modify any of the system files so that I don't get unexpected results with a package update for vim.
But that's easy to me as I'm the only user!
I don't know anything about arch-linux, nor about their changes in the vim package (and startup files), so cannot help you there.
I use a "syntax off" in my personal .vimrc, do NOT modify any of the system files so that I don't get unexpected results with a package update for vim.
But that's easy to me as I'm the only user!
But you are sometimes root and sometimes a regular user, are you not?
Note the "3" as the link count as I have a "admin" home dir too and there the root's .vimrc has been linked too.
PS: my .vimrc is much more specific than just the "syntax off":
Code:
map g G
set autoindent
set autowrite
set nobackup
set ignorecase
set nomesg
set optimize
set redraw
set report=2
set shiftwidth=4
set showmatch
set showmode
set noundofile
set viminfo=
set nowrapscan
syntax off
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.