Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
Changing default editor in rc.conf failed
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Other Things Gentoo
View previous topic :: View next topic  
Author Message
stieizc
n00b
n00b


Joined: 03 Oct 2012
Posts: 29
Location: China, Earth

PostPosted: Sat Oct 27, 2012 12:13 pm    Post subject: Changing default editor in rc.conf failed Reply with quote

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
View user's profile Send private message
John R. Graham
Administrator
Administrator


Joined: 08 Mar 2005
Posts: 10587
Location: Somewhere over Atlanta, Georgia

PostPosted: Sat Oct 27, 2012 12:24 pm    Post subject: Reply with quote

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.) :wink:

- John
_________________
I can confirm that I have received between 0 and 499 National Security Letters.
Back to top
View user's profile Send private message
keenblade
Veteran
Veteran


Joined: 03 Oct 2004
Posts: 1087

PostPosted: Sat Oct 27, 2012 12:50 pm    Post subject: Reply with quote

John R. Graham wrote:
(I'm one of those evil, demented emacs fellows, myself.) :wink:

+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
View user's profile Send private message
stieizc
n00b
n00b


Joined: 03 Oct 2012
Posts: 29
Location: China, Earth

PostPosted: Sat Oct 27, 2012 1:13 pm    Post subject: Reply with quote

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
View user's profile Send private message
John R. Graham
Administrator
Administrator


Joined: 08 Mar 2005
Posts: 10587
Location: Somewhere over Atlanta, Georgia

PostPosted: Sat Oct 27, 2012 1:34 pm    Post subject: Reply with quote

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. :wink:

- John
_________________
I can confirm that I have received between 0 and 499 National Security Letters.
Back to top
View user's profile Send private message
stieizc
n00b
n00b


Joined: 03 Oct 2012
Posts: 29
Location: China, Earth

PostPosted: Sun Oct 28, 2012 7:24 am    Post subject: Reply with quote

Wow, thank you!
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Other Things Gentoo All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum