20 points · by equalunique · 7y ago · 34 comments
Once you get a bit further into the OS and what you can do I find vim to be an important tool to learn.
Changing your editor or shell is super easy to do and anyone who has a strong preference can update either within seconds.
I used nano until I got on my feet too and I'd love for it to be added to the standards so it's always present. But the goal of good POSIXy defaults are for transferable consistent experiences/skills. I think defaults should be things you'd want for typical real world use, not to upgrade off of.
Edit: To clarify: I think accounting for beginners is important! But I don't think using crippled defaults are the way to do that.
> "I think accounting for beginners is important!"
I read this as two conflicting statements.
> But I don't think using crippled defaults are the way to do that.
I disagree that nano is a "crippled default" - nano is a highly competent text editor and I see plenty of industry professionals use it daily.
It has copy paste of a line or an arbitrary chunk of text (I learned that last week! But I often use the copy paste functionality of the terminal emulator anyway), syntax highlighting, undo redo, line numbers, search and replace. Access to these features is efficient.
It's also fast and lightweight. All the characteristics of a good default terminal text editor. Free us from vi! :-)
I mentor/teach with an "ability outwards" approach... ie: I want to get my students a simple capability first, and then "add tools to the toolbox" second. Typically, their first project is a small webserver with a database behind it (nginx static config first, then moving to a nginx + MariaDB + $their_preferred_language stack; all on Ubuntu Server).
Since that's a non-trivial task I want to keep the details as simple as possible, so they can focus on things that matter. Typically I won't teach vi/vim/sed/awk etc. until after they can accomplish actual work within the OS. Although I see complex text manipulation as important, I see it as additional tooling vs. a concept they can anchor their learning experience to.
> Nothing wrong with an immediately steep learning curve it's only hard until it isn't
I read this as "throw em in the lake, they'll learn to swim" vs. being honored to help them start in one of the most powerful ecosystems I've ever been privileged to build in: Linux.
https://www.gnu.org/fun/jokes/ed-msg.html
Surely you can set EDITOR on any machine you are doing real work on, which isn't going to be a fresh default installation.
OK, so the default should be vi, and damn the newbies... and the emacs users?
However, beginners need to learn these tools if they want to become even somewhat proficient on UNIX systems. No pain, no gain.
I've been using vi (and vim and neovim) for 20 years and it's a fantastic editor but not for people new to the command line. There's no reason that nano shouldn't be the default. It's available on many systems by default anyway and it's much more beginner friendly than any vi spinoff. If the only reason for sticking to a thing is "tradition" then it's right to re-evaluate it.
There's a reason that "how to exit vi(m)" is the most read question on StackOverflow.
"I can understand and appreciate your perspective and opinion and would offer an alternative viewpoint"
Once you learn how to exit vim you only need to look it up a few more times before you begin to get it
I've also struggled to exit nano from the keyboard with ^X or whatever
Appreciating all sides of an argument helps one understand the delicate balance that exists rather than the constant polarizing of opinion that agreement and disagreement evoke
And in nano it's displayed right there at the bottom of the screen at all times whereas with vi/vim/neovim you have nothing to go by unless you're lucky enough that you happened to open it up on an empty buffer in which case the "splash" screen will tell you to consult with :help or quit with :q. StackOverflow is a testament to how slim your chances of randomly guessing that is.
> Appreciating all sides of an argument helps one understand the delicate balance that exists rather than the constant polarizing of opinion that agreement and disagreement evoke
I would agree with that if the comment I was replying to actually put up some good-faith arguments rather than just making unsupported statements about Unix/Linux and vi(m), or if we were arguing something wildly subjective here but the argument I was making was that nano is easier for newcomers than vim, and there's plenty of empirical data in the form of questions in forums and the like to back that up.
I disagree with everything in this sentence.
(neo)vim + Unix tools make the best IDE in existence. Nothing else to date can hold a candle to that combination (except, perhaps, Plan 9 or Inferno OS).
Don't forget about the Dvorak keyboard. It doesn't work without Dvorak.
Just would hate to have vi dropped entirely, like it is in NixOS / GuixSD.
Also, I can't recommend vimtutor enough to anyone new to it who doesn't have nano at their disposal.
Would prefer if something like nano but non-GPL was available for the BSDs.