View previous topic :: View next topic |
Author |
Message |
stieizc n00b
Joined: 03 Oct 2012 Posts: 29 Location: China, Earth
|
Posted: Sat Oct 27, 2012 12:13 pm Post subject: Changing default editor in rc.conf failed |
|
|
I want to change the default editor for all users so I add "EDITOR="/usr/bin/vim"" but $EDITOR didn't change after restarting.
Also, eselect editor shows vi but no vim.
How to deal with that?
My rc.conf
http://bpaste.net/show/53956 |
|
Back to top |
|
|
John R. Graham Administrator
Joined: 08 Mar 2005 Posts: 10587 Location: Somewhere over Atlanta, Georgia
|
Posted: Sat Oct 27, 2012 12:24 pm Post subject: |
|
|
It's no longer set in rc.conf but in /etc/env.d/. eselect manages a file in there (99editor) now or you can set it yourself. Regarding the vi vs. vim issue, vi is probably just a symlink to vim and thus is probably what you want. (I'm one of those evil, demented emacs fellows, myself.)
- John _________________ I can confirm that I have received between 0 and 499 National Security Letters. |
|
Back to top |
|
|
keenblade Veteran
Joined: 03 Oct 2004 Posts: 1087
|
Posted: Sat Oct 27, 2012 12:50 pm Post subject: |
|
|
John R. Graham wrote: | (I'm one of those evil, demented emacs fellows, myself.)
|
+1
Sorry, I could not resist
stieizc, as John pointed, use this to list available editors:
Code: |
eselect editor list
[3] /usr/bin/emacs *
|
use this to set your editor:
Code: |
eselect editor set number
|
_________________ Anyway it's all the same at the end...
Need help to get it working: "x-fi surround 5.1" |
|
Back to top |
|
|
stieizc n00b
Joined: 03 Oct 2012 Posts: 29 Location: China, Earth
|
Posted: Sat Oct 27, 2012 1:13 pm Post subject: |
|
|
Thanks, that vi really is a link to vim.
But I now find 99gentookit-env and 99editor lying peacefully together in my env.d. What an interesting scene! Two 99. Now I'm confused about the necessity of the numbers... |
|
Back to top |
|
|
John R. Graham Administrator
Joined: 08 Mar 2005 Posts: 10587 Location: Somewhere over Atlanta, Georgia
|
Posted: Sat Oct 27, 2012 1:34 pm Post subject: |
|
|
Well, in one sense, it doesn't matter. 99editor controls the EDITOR environment variable and 99gentoolkit-env does not. In another sense, /etc/env.d is part of Gentoo's generic system-wide environment management system, which is described in the Handbook Working with Gentoo section, Chapter 5: Environment Variables.
Now, to your specific question. The digits prefixing each file name control the filesystem sorting order and thus the order that the env-update script parses the files to produce the permanent environment. Higher numbers are higher priority because the later parsing will override any earlier parsing.
- John _________________ I can confirm that I have received between 0 and 499 National Security Letters. |
|
Back to top |
|
|
stieizc n00b
Joined: 03 Oct 2012 Posts: 29 Location: China, Earth
|
Posted: Sun Oct 28, 2012 7:24 am Post subject: |
|
|
Wow, thank you! |
|
Back to top |
|
|
|