Set 'nano' as the default editor instead of JOE

I know that “preferred editor” is a contentious subject - everyone has their favorites for whatever reason (personally, I’m a vim guy). One thing, though, that would be really nice is to see a more common/user friendly editor as the default editor on the servers.

Currently, if you’re using git on a server, and run git commit, then you’ll get dumped into JOE, which, until this happened to me the first time, I had never heard of before. Initially, thinking it was vi/vim, I tried to :wq once I was done… This didn’t go down so well. For people unfamiliar with JOE, the way to write and quit is “ctrl + K + X”. I can’t remember how I stumbled upon this magical combination the first time, but it happened at some point in my key-mashing.

So basically, I’m wondering if the default editor could be changed to something that’s slightly more user friendly, like nano, which at least tells you what the basic commands are. I’m not proposing that it get changed to vi (even though that would be my preference) for exactly the same reason why JOE is a horrible choice of editor - for someone who’s never seen it before, it’s horrible and counter-intuitive.

So that’s all. Could we get an editor in place as the default editor which at least makes the most basic use case of “edit text, save file” obvious?

That’d be nice.

Actually, follow-on question: does anyone actually like joe, or would the world just be a happier place if we uninstalled it?

I’m sure someone SOMEWHERE likes it, but then some people like some pretty strange things.

Un-installing it would likely piss off someone (it was obviously installed for a reason at some point), but making it the non-default would make life much, much better for everyone.

Given a choice between nano and joe, I’m inclined to pick nano. But that said I haven’t done an extensive comparison as I mostly use vi myself.

I also vote nano over joe. Probably best not to uninstall it, but I’d be a happier hoster if I saw nano wherever I currently see joe.

As a bit of a linux newbie, I didn’t mind joe when I first ended up using it on my PS.

But I much prefer nano. I never had to open google to figure out how to just edit a file with nano. I’m not a power linux user, and the power users can switch their editors much easier than I can. So I vote nano.

Because the EDITOR variable / editors in general are a very personal thing… I would rather not update this system wide; but have you the user update your configuration to your needs.

In bash, you can simply perform export EDITOR=“vim”, nano, etc.

edit: if you’re an admin user:
You can also use to set your default editor.

Thank you.


is stevenb’s name supposed to be green? the tone of that post semi makes it seem so…

It does read that way a bit, doesn’t it? I don’t think he’s an admin, though.

Yes, preferred editor is a personal thing, but the default option should be the most user-friendly option available because the users who have another preference will generally be the ones who know how to change it, while the users who don’t know how to change their preference shouldn’t be stung with an uncomfortable choice.

nano is simply the most user-friendly choice. JOE is not.

#Edit: This pretty much sums up exactly why JOE is a bad choice as a default editor

If you check stevenb’s profile, you’ll see:

I agree.

I agree.

i always use nano. it works much more like the familiar options to users of word processors and text editors in gui. i have never seen joe. what does 'default editor really mean in the context of bash shell? tjere os no generic open command, unlike gui. you have to nano file cat file or vim file to opene it. i would recommend a link for noobies tk a wiki page about text editors nano and bash as more important than switching rthe default editor of git. noobies would not know what git is to begin with, so its neither here nor there

Joe shows it’s ugly head when people are committing stuff in CVS, or sending an email… or sometimes editing CRONtabs.

It’s an easy change to the EDITOR environment variable and you no longer have to deal with it.

Yeah, but the point I’m getting at is that because JOE is such a horrible/user unfriendly editor, you shouldn’t have to change your EDITOR environment variable (and believe me, there are a large number of people who can use bash, but wouldn’t know how to change that setting) in order to never see JOE.

As an example, I was talking my brother through setting up a git repository in his user account. He’s a primarily windows user, but was using PuTTY to SSH in and do things on the server. I talked him through the basics - cd, ls, mv, cp, rm, etc. but he doesn’t know very much about how *nix works.

He made a change on a copy of his code on the server, and ran git commit -a. He got dumped into JOE, and I had gone away for a couple of hours. When I came back, there was a massive list of frantic through to frustrated messages in my IM from him asking for help, and how to save the commit.

Are you seriously going to tell me that he as a customer of yours, should know to change his EDITOR environment variable away from the horrible default to a much better alternative? (Keep in mind, in this case “much better” means “more intuitive”)

That is why I started this thread, which looked like it was going in such a promising direction. The default is horrible for all but informed power-users. There is a non-horrible option available, which I feel should be the default. I have seen no compelling reason posted for keeping JOE as the default other than “Well you can change your default editor if you don’t like it (if you know how to, and are aware that there are even other editor options)”, or perhaps “Someone might really like JOE, so we better leave it as the default”.

In other news, I went to rent a car today, but as soon as I went to open the boot with the release under the steering wheel, the doors locked and I couldn’t get out of the car for an hour. I complained to the car rental place, but they told me it’s an option that I can change myself by playing around in the bonnet, and anyone who was familiar with this type of car would have known that already. They saw no need to change the setting on all their cars because informed renters would obviously be able to figure it out.

Oh, wait, that would never happen.

[/sarcastic angry rant]

If someone’s mucking about in shell then they should become familiar with how *nix works. Altering a non-hazardous environment variable such as the default editor is a very easy and safe instructional step in the learning process.

Entering a few statements in the shell is not “mucking around” in the shell.

Inexperienced users may just be following step by step instructions provided to them, like the ones I provide for PsManager, then they get to the point that they need to edit the crontab, end up in JOE and can’t complete the installation. At that point they end up thinking editing the crontab is too difficult and that Linux is a nightmare, they then either give up or turn to ask someone else.

This is the kind of user for which the default settings should just work and be intuitive. I do not want to turn these people away from using my application(s) by such needless complications. Besides it should be so that anyone can do simple tasks in the shell without needing to change the basic environment settings which they most likely don’t even know is possible.

The fact that it’s easy to change the editor for power users, and anyone who likes to use JOE is a power user, means they can easily change their settings to use JOE or any other editor.

If instruction makes any assumptions on a user’s environment; the instructions are flawed.

# begin instructions export EDITOR=/usr/bin/vim crontab -e #continue instruction...

Right so now instead of telling people to edit the crontab with crontab -e, we must first instruct them on how to set up their environment so as not to land in an editor that is hard to use for them.

Also I do not want to add bloat to instructions, by adding stuff that is irrelevant to the core task we are trying to accomplish. It’s also noise for more experienced users.

Apparently you find that normal, but I don’t. So clearly we disagree on this.

Yes, it’s normal practice in all correctly formatted instruction.

Your instruction on editing crontab appears to be a link to the DH Wiki. That one additional instruction might expedite your client’s success, and they could forgo a 30 minute read that might simply be confusing to them.