Hacker News new | past | comments | ask | show | jobs | submit login

Why? vi and its derivates has their own (weird) usage-convention which you will find in no other software anywhere on the planet. Learning them gives you very few transferable skills.

Any "Unixy" thing you have around these days will have more resources than most computes did in the mid 90s, and the need for a "lightweight" editor like vi is much, much smaller now than it was back then. Even my Buffalo router has nano.

For most Linux distros you install, you typically have nano, pico, joe, jedit or emacs or lots of other editors which (apart from emacs which is its own universe) largely follows the same conventions and at large gives transferable skills. These are IMO much more useful to know.

Why should I bother learning an archaic, non-standard editor from an era when "line-editors" were considered bloated? Why should it even be considered "relevant" today? Even more so, why should it be considered "essential"?

I really don't agree and I really don't see why vi-users insist everyone need to learn their favourite editor.




"Why? vi and its derivates has their own (weird) usage-convention which you will find in no other software anywhere on the planet. Learning them gives you very few transferable skills."

Arrgghhh!

man readline, and search (/) for inputrc.

ANY app that uses readline can be set to use vi OR emacs keystrokes and history, by setting an entry in .inputrc. If you use either editor regularly this will set your command line skills in lots of software all over the planet to warp speed.

If you write python command line programs, try "import readline."

Harumph!


And even more, there is rlwrap (i.e. readline wrap) command line utility that wrangles the badly behaved tools and allows you to use VI editing mode with almost anything (like cat command etc).


Well that's pretty cool.


While I'm still not going to bother with vi, I do have to admit this is probably just another one of those not-widely-known things about "Unix" which deserves some attention. God knows I didn't know about it.

Other cute things I have discovered lately: You can actually click in ncurses dialogs running in your terminal, even over SSH, if you run a proper terminal. Coming from a PuTTYish background, that is definitely not obvious ;)


And, if you've set -o vi in bash (etc?), when you're editing a command line and need more than just the limited set of vi commands that make sense on a command line, do this:

esc v

esc gets you out of input mode, and v takes the current command line that you're editing and opens a full vi/vim session initialized with the command line. After you're done editing it, :wq quits vi and executes the command. If you change your mind, delete everything in the buffer and then :wq

This is handy if you're editing a biggish command, particularly one from recent history like a loop or anything with a block.


`set -o vi` is a POSIX shell feature.


I think the main reason is when you're stuck on an unfamiliar system and emacs/[your favorite editor] is not available, vi is always there.




Consider applying for YC's Spring batch! Applications are open till Feb 11.

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: