Hacker News new | ask | show | jobs
by MaxBarraclough 2150 days ago
As a huge fan of Vim, I begrudgingly admit you have a point.

To someone new to the command-line, Vim is not at all approachable. Once you know your way around Vim, it's a fantastic editor, and frankly Nano just doesn't compare, but you can't expect a newbie to be able to use Vim effectively. Without a tutorial and a deliberate effort to learn it, Vim is rather baffling.

To the question of what should be the default, I suppose it depends on the context. A power-user distro wouldn't have much use for Nano, the choice would be between Vim and Emacs.

2 comments

My main problem with vim was, that I spent deliberate effort to learn some of its shortcuts, but I need to use text editor in a console only a few times per week, like change some config file or add line to cronjob. And then one tends to forget all the shortcuts, when not using it regularly enough.
Many IDEs and other editors have a vi-mode either built in or available as a plug in. I don’t use vim itself much (at work, at least) but I use vi keybindings everywhere.
Which are your favorites?

I have used the IdeaVim plugin for IntelliJ, and honestly it was so bad it was worse than not having the plugin at all. Maybe 20% of commands actually behaved consistently with vim. And IIRC, a decent chunk of my preferred vim functionality was outright unimplemented.

Perhaps ironically, I didn't have any such problems with the (commercial) plugin for Visual Studio. It worked very well. It cost $100, but my employer paid for that.

I've basically given up on IDEs after that and just use vim itself. If you know of any that have a really good vi-mode plugin, I'd love to try one!

Emacs has a pretty good vi mode called evil. I use spacemacs, but I am not sure, if it is what you are looking for. Should you try it, do yourself a favor and use the development branch. I read good things about doom Emacs as well.
Yes, I think it only makes sense to learn vim if you're going to spend a lot of time using it actively. I use vim for almost all programming I do, so that made it really easy to burn it in my brain forever.
When vi or vim opens for the first time, it should simply state 2 things:

- New to vi(m)? Close the editor by typing :q!

- Learn vi(m) by running the following program: vimtutor

Vim effectively does that with its splash screen:

                  VIM - Vi IMproved

                   version 8.2.814
               by Bram Moolenaar et al.
     Vim is open source and freely distributable

            Help poor children in Uganda!
    type  :help iccf<Enter>       for information

    type  :q<Enter>               to exit
    type  :help<Enter>  or  <F1>  for on-line help
    type  :help version8<Enter>   for version info

The problem is that a total noob will still be overwhelmed, Vim's UI is simply too different from modern UI conventions.

That's why I think it makes total sense for nano to be the default editor in this day and age, even it if means that I'll have to remember to set EDITOR properly if I want to use vi(m).

I think that's way too much information and agree that new users will feel overwhelmed.
This doesn't fix the problem. If it's a newbie, they should be given Nano. They probably just want to get the job done, whatever it may be. It shouldn't be assumed that now is the time for them to learn Vim (which is no small thing). Neither should it be assumed that quitting Vim solves the problem. They might not know how to reconfigure the default editor that some other program is using, for instance.