This was one of the most frustrating things when I was learning linux, "I press buttons but nothing happens, how do I get out of here?"
An esoteric example from my MacOS X:
sh-3.2# EDITOR='cat' vipw | grep root:
root::0:0::0:0:System Administrator:/var/root:/bin/sh
daemon::1:1::0:0:System Services:/var/root:/usr/bin/false
vipw: no changes made
vipw: /etc/master.passwd: unchanged
_cvmsroot:*:212:212::0:0:CVMS Root:/var/empty:/usr/bin/false
sh-3.2#
Great excuse to talk about environment variables and changing/examining them...
Since this is a guide for linux, this is a natural step in the linux learning :)
It's pretty much the only decent editor constant in all linux distos. I think it's better to get it out of the way or the linux user won't be able to edit a file properly.
I know _way_ too many sysadmins, even distro maintainers, seasoned devops engineers, who have stuck with nano, joe, etc. for years and years and still stick by it. Although I am glad that I learned vim when I was starting out some 6 years ago, I wish I had spent all that time learning Python or Perl well. Too often the importance of vim is over-inflated as a necessary skill -- but it's just one _tool_ (besides emacs) that gets you some efficiency. That is all it is. I would _never_ advise someone starting out with Linux to spend huge amounts of time learning vim/emacs, it's too much of a distraction in the beginning.
press
i
to start editing textto save and quit, press
ESC + : + w + q + ENTER
And I'm a hard core Vim user. I have no strong opinions for or against specific text editors but any hacker worth their salt should know Vim and/or Emacs to be able to use a powerful text editor when stranded in the console for one reason or another.
But this kind of superficial introduction to Vim is a big disservice. The last thing we need is people who hate Vim because they understand it poorly based on a short tutorial.