"disabling vim syntax", or "how to override a suse default"
Hi, all -- I'm running Leap 15.x on various computers davidtg@jpo:~> for H in jpo diskfarm gezebel ; do echo $H ; ssh $H " egrep '^(NAME|VERSION)' /etc/os-release " ; echo '' ; done jpo NAME="openSUSE Leap" VERSION="15.2" VERSION_ID="15.2" diskfarm NAME="openSUSE Leap" VERSION="15.2" VERSION_ID="15.2" gezebel NAME="openSUSE Leap" VERSION="15.1" VERSION_ID="15.1" (yes, I'm planning to update soon; see my recent update-and-migrate thread) and have finally gotten tired enough of stupid syntax highlighting, especially when vim complains No Syntax items defined for this buffer on startup, to dig into it. I find that the SuSE vimrc turns it on by default: davidtg@jpo:~> grep syn /usr/share/vim/vim80/*vimrc* /usr/share/vim/vim80/gvimrc_example.vim: " Switch on syntax highlighting if it wasn't on yet. /usr/share/vim/vim80/gvimrc_example.vim: if !exists("syntax_on") /usr/share/vim/vim80/gvimrc_example.vim: syntax on /usr/share/vim/vim80/suse.vimrc:" enable syntax highlighting /usr/share/vim/vim80/suse.vimrc: syntax on /usr/share/vim/vim80/vimrc_example.vim:if has('syntax') && has('eval') GAAAH! No wonder I'm seein' this thing all of the time ... Of course, I turn it off davidtg@jpo:~> cat .vimrc source $HOME/.exrc syntax=off in my own .vimrc file, but that doesn't seem to matter ... This concept has come up before for default aliases, too. I tried a few ways to permanently stomp on some /etc/profile.d/* files, but anything that promises to be permanent also breaks updates, so I'm stuck making the same changes again and again. I foresee the same thing with syntax settings *sigh* So what's the best way to step on a setting or file that is placed by default but should be able to be overridden -- just once, and thus forevermore -- by the admin? TIA & HAND :-D -- David T-G See http://justpickone.org/davidtg/email/ See http://justpickone.org/davidtg/tofu.txt
From: David T-G <davidtg-robot@justpickone.org> Date: Mon, 12 Sep 2022 03:54:09 +0000 Hi, all -- I'm running Leap 15.x on various computers . . . So what's the best way to step on a setting or file that is placed by default but should be able to be overridden -- just once, and thus forevermore -- by the admin? Doing "rpm -q --dump vim-data-common" on my 15.4 system shows that rpm does not consider the files in /usr/share/vim/vim*/ as config files. If they had been tagged that way, you would be able to configure them to your heart's content, so that's probably worth a bug report. -- Bob Rogers http://www.rgrjr.com/
David T-G wrote:
GAAAH! No wonder I'm seein' this thing all of the time ... Of course, I turn it off
davidtg@jpo:~> cat .vimrc source $HOME/.exrc syntax=off
in my own .vimrc file, but that doesn't seem to matter ...
Wild guess - shouldn't that be 'syntax off' ? -- Per Jessen, Zürich (13.5°C)
On 2022-09-12 05:54, David T-G wrote:
Hi, all --
...
in my own .vimrc file, but that doesn't seem to matter ...
This concept has come up before for default aliases, too. I tried a few ways to permanently stomp on some /etc/profile.d/* files, but anything that promises to be permanent also breaks updates, so I'm stuck making the same changes again and again. I foresee the same thing with syntax settings *sigh*
It should not break updates. When there is an update to those files, one of two things can happen: 1) Your file is replaced with a new file, but actually it is renamed to /path/someconfig.rpmorig 2) Your file remains intact, but the update appears renamed to /path/someconfig.rpmnew It is your job as administrator to check for the existence of those files. There is a command that list them: Telcontar:~ # rpmconfigcheck Searching for unresolved configuration files Please check the following files (see /var/adm/rpmconfigcheck): /etc/apparmor.d/usr.sbin.smbd.rpmnew /etc/rsyslog.d/remote.conf.rpmnew /etc/smartd_warning.sh.rpmnew /etc/zypp/zypp.conf.rpmnew Telcontar:~ # Telcontar:~ # l /etc/zypp/zypp.conf.rpmnew /etc/zypp/zypp.conf -rw-r--r-- 1 root root 21865 Jan 13 2021 /etc/zypp/zypp.conf -rw-r--r-- 1 root root 21547 Feb 3 2022 /etc/zypp/zypp.conf.rpmnew Telcontar:~ # So now I would do: meld /etc/zypp/zypp.conf.rpmnew /etc/zypp/zypp.conf and check the changes to accept them or not. Finally: rm /etc/zypp/zypp.conf.rpmnew Usually, I do a backup of both files before doing any change. -- Cheers / Saludos, Carlos E. R. (from 15.3 x86_64 at Telcontar)
From: "Carlos E. R." <robin.listas@telefonica.net> Date: Mon, 12 Sep 2022 10:01:46 +0200 On 2022-09-12 05:54, David T-G wrote:
Hi, all --
...
in my own .vimrc file, but that doesn't seem to matter ...
This concept has come up before for default aliases, too. I tried a few ways to permanently stomp on some /etc/profile.d/* files, but anything that promises to be permanent also breaks updates, so I'm stuck making the same changes again and again. I foresee the same thing with syntax settings *sigh*
It should not break updates. When there is an update to those files, one of two things can happen: 1) Your file is replaced with a new file, but actually it is renamed to /path/someconfig.rpmorig 2) Your file remains intact, but the update appears renamed to /path/someconfig.rpmnew Those renames only happen when the file in question is marked as a config file. As I pointed out, /usr/share/vim/vim*/suse.vimrc at least does not have that bit enabled. That is what requires a bug report. -- Bob
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 El 2022-09-12 a las 14:19 -0700, Bob Rogers escribió:
On 2022-09-12 05:54, David T-G wrote:
Hi, all --
...
It should not break updates.
When there is an update to those files, one of two things can happen:
1) Your file is replaced with a new file, but actually it is renamed to /path/someconfig.rpmorig
2) Your file remains intact, but the update appears renamed to /path/someconfig.rpmnew
Those renames only happen when the file in question is marked as a config file. As I pointed out, /usr/share/vim/vim*/suse.vimrc at least does not have that bit enabled. That is what requires a bug report.
Yes, I saw your explanation after I posted and it makes sense. - -- Cheers Carlos E. R. (from openSUSE 15.3 (Legolas)) -----BEGIN PGP SIGNATURE----- iHoEARECADoWIQQZEb51mJKK1KpcU/W1MxgcbY1H1QUCYx+zlhwccm9iaW4ubGlz dGFzQHRlbGVmb25pY2EubmV0AAoJELUzGBxtjUfV+vsAn04uFQLpodbSVyhmHG6b x50sEk98AJwP+Ls3zhSTIr32GcahYPIpsZaBHA== =Nhnr -----END PGP SIGNATURE-----
On 13.09.2022 00:19, Bob Rogers wrote:
Those renames only happen when the file in question is marked as a config file. As I pointed out, /usr/share/vim/vim*/suse.vimrc at least does not have that bit enabled. That is what requires a bug report.
suse.vimrc is sourced if /etc/vimrc does not exist. If you want to modify it, copy it as /etc/vimrc and edit. If you want to disable it, create empty /etc/vimrc.
From: Andrei Borzenkov <arvidjaar@gmail.com> Date: Tue, 13 Sep 2022 07:09:20 +0300 On 13.09.2022 00:19, Bob Rogers wrote:
Those renames only happen when the file in question is marked as a config file. As I pointed out, /usr/share/vim/vim*/suse.vimrc at least does not have that bit enabled. That is what requires a bug report.
suse.vimrc is sourced if /etc/vimrc does not exist. If you want to modify it, copy it as /etc/vimrc and edit. If you want to disable it, create empty /etc/vimrc. So the real solution is, "Read the vim documentation." ;-} -- Bob
Per, et al -- ...and then Per Jessen said... % David T-G wrote: % ... % > davidtg@jpo:~> cat .vimrc % > source $HOME/.exrc % > syntax=off ... % % Wild guess - shouldn't that be 'syntax off' ? D'oh! You're correct, of course. So now I've made it go away; yay. Thanks and silly me. Back to the question of how to override default files, and some of the answers proposed in these threads, ASAP. First, though, back to lawsuit hassles *sigh* Thanks again & HANW :-D -- David T-G See http://justpickone.org/davidtg/email/ See http://justpickone.org/davidtg/tofu.txt
participants (5)
-
Andrei Borzenkov
-
Bob Rogers
-
Carlos E. R.
-
David T-G
-
Per Jessen