Skip to content

109 comments

Even though I'll never use nano I don't really have a problem with this -- I'll install vim and set EDITOR. One use case that might bother me though is trying to do an install or rescue from a boot image and discovering there is no vi. Are there good arguments against including vim-minimal in [core]?

55 points

Quite frankly, when you're doing editing jobs large enough to matter from a rescue disc, why not install vim it in ram? Or keep your own rescue setup handy (I have a usb key setup for such an occasion)?

Usually you're just changing something in e.g. syslinux.cfg, and in my experience back to what it was previously. For those three-line operations nano is perfectly capable.

4 points

You can also make your own arch isos.

Personally I have script that build a new one. It enables ssh, installs a key, add vim, network manager for wifi and cloud-init (although I haven't gotten around to using that yet).

I also expose the entire thing over my network via a PXE server so no burning discs/messing around with USB sticks.

8 points

Yeah, you're right about that, and it's more important to have an editor that anyone can use in those situations than it is to have my "favorite" editor. I remember a few years ago discovering that the single user mode of whatever BSD system I was using only had ed (I think maybe vi was in /usr, which couldn't be mounted)...I would have pretty happy with nano at that point.

1 points

Vim should be the default

50 points

I'm a vim fanboy, but I disagree. Nano is a better choice as a default due to the keyboard shortcuts shown on-screen. You can't expect everyone to know vim, and setting $EDITOR is really easy.

108 points

cant be worse that VI... right? the logical change will be from VI to VIM... is not that nano is any easier for someone that is coming from windows.. you will be surprised in how many developers use vim under OSX and windows.

7 points

I prefer vim as well.
But I think a default editor should be as simple and general (as in without any unique features) as possible.
Vim is clearly not that.

37 points

I would go as far as to say that using vim as a default would go against everything Arch stands for. Were we not as minimal as possible? How is vim a 'requirement'? That makes no sense whatsoever. vim can do more than the occasional operating system. Obviously a default Arch installation has to stick to its own philosophy - especially when we are talking about the (greatest in the world) text editor.

2 points

I use nano but I still think Vim is awesome and vi is just damn outdated.

If there was a vim tutorial I didn't have to pay for that wasn't vimtutor and involved me, I'd be using vim everyfuckingwhere.

Yes, I'm so freaking cheap that I don't want to buy a license for that game you all know about. That's like, most of a dinner with my gf. GF is more important.

EDIT: Also, colemak. I don't use qwerty, vim navigation shortcuts are useless for me.

3 points

Hmm, want to consider giving it another shot? May I ask what you did not like about vimtutor?

With vim, you start of being more helpless and essentially slow than with any other editor. But there is this 'cut-off' point in time. That is the point where your vim skills catch up with the average text editor.

From that point on, vim won't cost you any extra time to do whatever you do with text editing. If you are already a terminal user, then that point of time should be around 30 minutes - 120 minutes into your vim learning (regardless what tools you use). (Granted, my dad would probably need 10-20 hours but he has a hard time using his web browser as is).

From that point on you sticky note 4-5 new vim commands every week and just make an effort using them when they are efficient. After a week or so those commands become muscle memory and you can continue etc.

The important thing to note is, this choice is like quitting to smoke. There is no point "choosing" to do this 6 months or a year later. The sooner you start the better - assuming you really want to do it eventually anyway. The time you wait until then is just wasted.

3 points

I simple rebound all vim keys to the colemak keys so that the position on the keyboard didn't change.

There are probably more optimal setups, but I switched from qwerty to colemak long after I started using vim.

What's wrong with vimtutor? Everything after that is just using it every day.

2 points
unknown author2 hidden

Vi is old, but it works, and it certainly doesn't lack features compared to nano...

1 points
unknown author1 hidden

Deleted before we saved it.

2 points

I prefer vim myself, but I suspect that vim users also know how to set $EDITOR.

10 points

Nano is a lot easier to learn and is already in the base install, so I agree it should be default.

Although I like vim better and would really like it to be in core/base, the fact is it's easy enough to install and configure any editor you want to be default so it doesn't matter.
And in that case, might as well go with the easiest one as default.

34 points
unknown author2 hidden

hjkl i esc :q :w

You just learned all the vi you need ever to have it work better than nano. How is it hard to use again?

-6 points

I'm not saying vi is hard. In fact, I prefer it (or rather, its direct successor vim) to any other editor. You do have to know a few commands (:w :x etcetera) to work with it though.

Nano has all the keybinds right on the screen, so no need to learn anything.

String mandatoryEditorWarsJoke = "Also they need to cater to the lowest common denominator - both vim and emacs have a fanatical following that would abandon a distro for making the other one a default. Nano, being relatively neutral ground, would not have this effect.";

4 points

So i guess hjkl i esc :q and :w can can cut/paste text as well. And somehow i always thought, searching used a different command as well. (And thanks to all those compatibility settings like arrow keys, getting to the end/beginning of a row is the same as in nano.. else you would need to know $ and 0 as well.)

Don't get me wrong, i use vim almost all the time. But it isn't the better choice.

2 points
h3stOP3 hidden

Also I know I said the magic words "default editor", so here you go, ed is the default editor.

27 points

There is an extended implementation of ed called ex.

ex has a visual mode that you start by entering the ex command :vi. Some clever dude made an executable called vi that started ex and immediately went into visual mode. The rest is history. (Don't believe me? Start vi and type Q to leave visual mode)

Probably everybody knows this already, but this blew my mind the first time I stumbled on this fact. Also this makes vim the true heir from the mighty ed bloodline of the house of standard text editors!

14 points

SO THAT'S WHAT HAPPENS! I always wondered why I ended up in ex-mode every now and then.

3 points

Came here to say this. It's the only choice that makes any sense.

1 points

Here is why this is a good idea: anyone who knows what ^ means can use nano. vim requires reading a manual, and the way it works is foreign compared to other editors and the command line in general.

23 points
unknown author6 hidden

hjkl i esc :w ;q

There's all the manual you need to surpass nano.

-5 points

No, that's all you need to equal nano.

I prefer vim myself, but let's not pretend that nano isn't infinitely more intuitive (and thus useful) for new users.

New users don't have to look up how to use nano. They do for vim.

6 points

Nano makes far more sense. It's easiest for everyone to use. Everyone has their preferences, but as an emacs user I grumble everytime I am forced to use vi/vim and inevitably forget to press 'i'. Vim users can easily use nano, emacs users can easily use nano, everyone can easily use nano. Vi not so much.

17 points

Can't say that I care one way or the other. If I were interested in using defaults, I wouldn't be using Arch in the first place and vim is just a command away.

10 points

I agree. Whatever they choose is fine by me, I'll just set EDITOR if they choose Nano.

5 points

I think nano is a bad choice for a default editor for these types of config files. Its default setup has word wrap on, and the way it's implemented actually inserts unwanted newlines into files if you type a line too long instead of just wrapping on-screen.

7 points

The nano package is built with --disable-wrapping-as-root so wrapping is disabled when editing files as root.

10 points

This sounds like a very ugly hack. I tend to use sudoedit to edit configuration files, whose point is exactly not to run the editor as root.

Also, Nano badly needs a single shortcut to save and exit. It's outrageous that such a common operation needs four key presses (Ctrl X Y Enter). This may be only one more than in vim, but :x is can be typed much faster.

3 points

Yeah, and this bad behavior is a really big deal. If mc is on the install image (I'm not sure where to see this -- edit: oh never mind it's in community), why not make the default editor mcedit?

2 points

unless people would really prefer vim to enter [core]

Yes please.

6 points

Saw this on the mailing list, I've always preferred nano, but thats just me, I would much prefer to have vim-minimal in core that vi because vi is over 15 years since last update.

5 points

Sounds good to me. Nano has been good to me while I sharpened my CLI skills.

4 points

Even as a vim-guy, I would prefer to have nano as default. Makes it more user friendly.

For the 4 packages who need compile time editor setup: Couldn't we just use a small stub program who calls VISUAL/EDITOR instead?

4 points

Should I remove the vi package then? When updating with pacaur, it now states that it can't find vi in the AUR.

2 points

can i still put 'set -o vi' into my bash environment? i need vi or vim as my command line editor

2 points

That's a feature built into the shell. It doesn't actually make any calls to vi.

2 points

Personally, I'd rather vim enter [core]. But whatever happens it'll be fine. I can deal with nano as a default.

2 points

For a installer it kind of make sense. Vi was old and very unpractical to use (even for a daily vim user), and when you firstly install Arch Linux a simpler editor like Nano is a good idea. If you want a rescue-disk-for-emergency-cases, you can just make a little install on a USB key or whatever and keep it around in case you can't boot otherwise, it can come in handy sometimes ^^

2 points

This was reverted, vi is the default editor again:

OK, we can't go with vim-minimal, and since nano was met with some resistance, I've restored the status quo by putting vi back in [core]:

This discussion is now concluded, though I'm sure it'll pop up again at some point in the future. At least we now get vim on the installation image, which solves my main annoyance about vi. :)

https://lists.archlinux.org/pipermail/arch-dev-public/2015-April/027133.html

2 points

Does that mean that everything will be nano now? Or will it still use $EDITOR?

1 points

When a user does not define $EDITOR, the default will presumably be nano, I think.

I think it is a necessary change, visudo with vi is completely broken.

9 points

I actually prefer vi to nano, now. I keep spamming nano with things like "lllllll" or ":w" or "cw" :/

EDIT: But, someone who hasn't even set their $EDITOR will want to use nano.

3 points

And it might be better for newer users (like me) who never really bothered trying to learn vim since nano does everything I need and it tells me how to exit it

3 points

I, too, prefer vim (after having gotten used to it) but I think nano should be the default. What's the problem with vi and visudo?

2 points

Surely $EDITOR will still be respected. Nobody's going to overwrite your shell configuration or go through the trouble of patching every piece of software that uses $EDITOR.

2 points
unknown author

Deleted before we saved it.

1 points

I can't take tutorials/etc that tell me to use nano to edit files. vi/vim in core, please.

1 points

I'm using vim for everything from writing novels to managing a repo with 50+ software packages.

I'd still prefer nano as default, if only to keep the size of the install images reasonably small.

1 points

Being the biggest vim supporter there is and using it exclusively for virtually any text processing, coding, editing and mark-up, I have to speak against the hive mind.

vim is great. However it is as far from a requirement and sane default as a text editor could be. However, things should be done with vim as the popular choice in mind. Despite, by default, not using vim for most things, it should be as simple as installing vim via pacman to have everything default to vim instead.

If vim is required in a multi-user environment, individual users can still use their own choices. However it seems very sane that vim is only a default as soon as it is installed.

1 points

I have sympathy for vionly because it's a (known to me) trace of the original UNIX.

1 points

Keyboard shortcuts

Move and act

jork
Next / previous post or comment
Enteroro
Open the post
f
Open the media viewer
s
Save
h
Hide (the toast has Undo)
Tab
Right after an action: the toast's Undo
x
Collapse the comment
v
Next layout: cards, compact, grid

Go to

/
Search
gthenh
Home
gthena
All
gthens
Subreddits
gthenl
Library
?
This list
Esc
Close a menu or this list

In the viewer

←or→
Previous / next file
↑or↓
Previous / next post
korj
Previous / next post
Space
Play / pause
m
Mute
z
Zoom
s
Save
o
Open the post (on its own page: back to it)
Esc
Close

Keys do nothing while you type in a box.