views:

273

answers:

5

Maybe this should be a community wiki page...

What unix text editor should I learn? My co-workers mostly use vi. I am thinking about vim because the syntax highlighting seems appealing. Is there any advantage to vi over vim?

I know that there are a lot of emacs fans out there too? Is there any reason to learn a specific editor?

Can you point me to some good learning references (for your suggested editor)?

Thanks!

+2  A: 

If you're not sure, try several of them:

Use whichever one works best for your needs. Letting someone else make this decision for you is not a great idea.

Here is a more comprehensive list with a comparison of features:

http://en.wikipedia.org/wiki/Comparison_of_text_editors

AJ
Point taken. I know pico but I am hoping for something more powerful. Looking for a starting point.
sixtyfootersdude
+2  A: 

Advantage of vi over vim is that it's 100% available everywhere. vim may not be.

You may want to try both vi and emacs. It's a religious thing - you can never get a good answer for preferring one over the other because the answer depends mostly on your own likes/dislikes/preferences/needs.

If you know pico as you noted in one comment, emacs may be easier for you to learn than if you didn't, since pico was IIRC done as "emacs very lite"

Also, one point you didn't consider is that most good Windows editors support editing files off of Unix file systems via either FTP or if you have it available, mounted drives. You need to learn A unix editor just in case (ore more than one), but you're not locked into using one even if doing Unix programming as your main editor.

DVK
+1  A: 

With this question you are looking for the answer in a holy war. That probably means both vi(m) and emacs will suit your needs.

For vim I have often used this site: http://vim.wikia.com/wiki/Vim_Tips_Wiki

And this cheat sheet: http://www.digilife.be/quickreferences/QRC/VIM%20Quick%20Reference%20Card.pdf

Thirler
+8  A: 

Learn nvi, vim (essentially the same, for basic operation) and emacs to the point that you can do minor edits. Then decide which one you prefer and learn it more thoroughly. I have a preferred editor that is one of those three, but can do basic editing tasks with all of them.

Vatine
+1 Couldn't have said it better myself. That way when you need to do something on the fly on somebody else's system you don't need to rely on having your favorite tools!
controlfreak123
I disagree. If you limit yourself to a basic usage of vim, you'll hate it
kemp
I hate vim because it is subtly different in behaviour from the vi I learned those 20 years ago. But, that's "only" display differences and I can live with it.
Vatine
+1  A: 

use emacs, of course! :)

i only got into emacs because bash command-line editing uses emacs-like key sequences, but that's by default; U can turn on vi keys if U want. it's a matter of taste, i guess. emacs can handle binary files transparently, but once again, since i only know how to quit out of the dreaded vi (:q), i don't know how vi handles them. as has been noted, try a few of them to see which fits your needs.

tanstaafl