You are not logged in.

#1 2012-02-05 05:10:24

Zarcjap
Member
Registered: 2011-06-28
Posts: 29

[SOLVED] How to set $EDITOR

for some reason my system doesn't have anything set for $EDITOR. Obviously I could set it with

export EDITOR=nano

in my .bashrc file but that just feels sloppy. Is there a better way, a more recommended way that is, to set it? I feel like there must be a setting in some configuration file somewhere for it already.

Last edited by Zarcjap (2012-02-05 16:14:48)

Offline

#2 2012-02-05 05:17:20

jasonwryan
Anarchist
From: .nz
Registered: 2009-05-09
Posts: 30,424
Website

Re: [SOLVED] How to set $EDITOR

My understanding is that you should put your environment variables in ~/.profile (or ~/.bash_profile if that is your shell, but you will need to source ~/.bashrc from there).

The Invocation section of the bash man page has more details...


Arch + dwm   •   Mercurial repos  •   Surfraw

Registered Linux User #482438

Offline

#3 2012-02-05 11:24:02

thisoldman
Member
From: Pittsburgh
Registered: 2009-04-25
Posts: 1,172

Re: [SOLVED] How to set $EDITOR

You may also place the line in /etc/bash.bashrc to set the variable for all users.  System-wide aliases can also go in that file.

Offline

#4 2012-02-05 16:14:34

Zarcjap
Member
Registered: 2011-06-28
Posts: 29

Re: [SOLVED] How to set $EDITOR

That sounds more like what I was looking for, a system wide setting. Thanks.

Offline

#5 2012-02-05 16:19:24

swanson
Member
From: Sweden
Registered: 2011-02-05
Posts: 759

Re: [SOLVED] How to set $EDITOR

'System-wide' does that include root as well? I've some problems with aliases for root.

Offline

#6 2012-02-05 17:09:01

karol
Archivist
Registered: 2009-05-06
Posts: 25,440

Re: [SOLVED] How to set $EDITOR

swanson wrote:

'System-wide' does that include root as well? I've some problems with aliases for root.

Please open another thread, give us more info about your settings and post some examples - what works, what doesn't - for the regular users and for root.

Offline

Board footer

Powered by FluxBB