LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Arch
User Name
Password
Arch This Forum is for the discussion of Arch Linux.

Notices


Reply
  Search this Thread
Old 05-06-2019, 03:33 AM   #16
business_kid
LQ Guru
 
Registered: Jan 2006
Location: Ireland
Distribution: Slackware, Slarm64 & Android
Posts: 16,437

Rep: Reputation: 2340Reputation: 2340Reputation: 2340Reputation: 2340Reputation: 2340Reputation: 2340Reputation: 2340Reputation: 2340Reputation: 2340Reputation: 2340Reputation: 2340

Typo. Should have been 'to sort'

I've only one arm moving here. The left hand is dead
 
Old 05-06-2019, 01:45 PM   #17
stf92
Senior Member
 
Registered: Apr 2007
Location: Buenos Aires.
Distribution: Slackware
Posts: 4,442

Original Poster
Rep: Reputation: 76
Quote:
Originally Posted by ehartman View Post
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.
 
Old 05-07-2019, 01:13 AM   #18
ehartman
Senior Member
 
Registered: Jul 2007
Location: Delft, The Netherlands
Distribution: Slackware
Posts: 1,674

Rep: Reputation: 888Reputation: 888Reputation: 888Reputation: 888Reputation: 888Reputation: 888Reputation: 888
Quote:
Originally Posted by stf92 View Post
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!
 
Old 05-07-2019, 05:01 AM   #19
business_kid
LQ Guru
 
Registered: Jan 2006
Location: Ireland
Distribution: Slackware, Slarm64 & Android
Posts: 16,437

Rep: Reputation: 2340Reputation: 2340Reputation: 2340Reputation: 2340Reputation: 2340Reputation: 2340Reputation: 2340Reputation: 2340Reputation: 2340Reputation: 2340Reputation: 2340
I presume you're bellyaching on an Arch forum also. What do they say?
 
Old 05-07-2019, 05:57 PM   #20
stf92
Senior Member
 
Registered: Apr 2007
Location: Buenos Aires.
Distribution: Slackware
Posts: 4,442

Original Poster
Rep: Reputation: 76
Quote:
Originally Posted by ehartman View Post
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?
 
Old 05-07-2019, 09:56 PM   #21
ehartman
Senior Member
 
Registered: Jul 2007
Location: Delft, The Netherlands
Distribution: Slackware
Posts: 1,674

Rep: Reputation: 888Reputation: 888Reputation: 888Reputation: 888Reputation: 888Reputation: 888Reputation: 888
Quote:
Originally Posted by stf92 View Post
But you are sometimes root and sometimes a regular user, are you not?
Yes, but my user's .vimrc is a HARD link to the one for root:
Code:
 $ ls -l .vimrd
-r--r--r-- 3 root sys 211 2019-03-01 12:00 .vimrc
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
 
Old 05-07-2019, 10:08 PM   #22
dugan
LQ Guru
 
Registered: Nov 2003
Location: Canada
Distribution: distro hopper
Posts: 11,249

Rep: Reputation: 5323Reputation: 5323Reputation: 5323Reputation: 5323Reputation: 5323Reputation: 5323Reputation: 5323Reputation: 5323Reputation: 5323Reputation: 5323Reputation: 5323
Quote:
Originally Posted by stf92 View Post
However, I still have syntax highlighting. Possible cause?
You have a ~/.vimrc file. Its presence stops vim from loading the defaults.

I start mine with the following, to get it to load Vim 8's new defaults:

Code:
scriptencoding utf-8

if filereadable(expand('$VIMRUNTIME/defaults.vim'))
    unlet! g:skip_defaults_vim
    source $VIMRUNTIME/defaults.vim
endif

Last edited by dugan; 05-07-2019 at 10:40 PM.
 
Old 05-08-2019, 06:44 PM   #23
stf92
Senior Member
 
Registered: Apr 2007
Location: Buenos Aires.
Distribution: Slackware
Posts: 4,442

Original Poster
Rep: Reputation: 76
Quote:
Originally Posted by dugan View Post
You have a ~/.vimrc file. Its presence stops vim from loading the defaults.
It is running as root that I have syntax highlighting and I do not have a /root/.vimrc.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
LXer: UK judge: Apple notice on Samsung a - breach of order - , orders new notice LXer Syndicated Linux News 0 11-02-2012 02:10 PM
hi i not getting my .vimrc file in this path ~/.vimrc dina3e Linux - Newbie 6 07-31-2012 04:36 PM
ls -a *vim* does not find .vimrc notwithstanding it is there. stf92 Linux - Newbie 2 07-09-2011 12:40 PM
LXer: Novell Receives Delisting Notice From NASDAQ and Notice of Default From Wells Fargo Related to its Convertible Subordinated Notes Due to Late Filing of Form 10-Q LXer Syndicated Linux News 0 09-21-2006 03:54 AM
wher is my vimrc file and the .vim directory slac 10.0 rkrishna Slackware 3 04-11-2005 03:50 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Arch

All times are GMT -5. The time now is 02:43 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration