I want all users of nano to have tabsize 4
instead of the default 8. What is the best way to achieve this? I would prefer a file that overrides /etc/nanorc at the system level so I don't have to maintain separate user nanorc's for this purpose. In the simple case, my override would only need to contain:
set tabsize 4
Here's another way to state my question: Does nano recognize /etc/nanorc.d/ and config files placed therein? If so, what is the required naming and/ content of config files placed there?
What I tried so far was to create /etc/nanorc.d/
and place a file named tabsize.conf in that directory and put only the following contents in the file:
set tabsize 4
My naive attempt did not work, but I am hoping there is a way to use this config.d/ pattern with nano.
I will make my question even more specific. I am using Arch Linux. I have do do these steps when the package has a new nanorc:
mv /etc/nanorc.pacnew /etc/nanorc
Then edit /etc/nanorc
, search for tabsize, uncomment the line, change the value from 8 to 4 and save the file.
My goal is to only have to do this step:
mv /etc/nanorc.pacnew /etc/nanorc
And to have a file similar to /etc/nanorc.d/tabsize.conf
that contains my desired tab size. It's a small savings of time, but multiplied across a number of computers it adds up. This year it seems like I have gotten new /etc/nanorc.pacnew
files about six times. It is very inefficient to keep editing tabsize over and over.
/etc/nanorc
? – Ipor Sircer Sep 27 '18 at 0:51/etc/nanorc
gets over-written on package updates and I am constantly having to edit it to once again set tabsize 4. I'm trying to avoid that. – MountainX for Monica Cellio Sep 27 '18 at 1:49/etc/nanorc
on every updates. This is the clean way. – Ipor Sircer Sep 27 '18 at 2:50