# emacs or vi which should a windows user learn?

I am currently reading a book on bash and it recommends learning either emacs or vi. I am primarily a windows user and not very experienced with linux yet. So which would be best to learn, or is there no clear choice?

-
You should learn ed, cat, and sed. Those are the basics and you'll have them anywhere. :) –  Shiki Jun 25 '10 at 19:19

## 9 Answers

VI[M] is standard across all systems while the installation for Emacs will vary depending on any number of settings.

-
What settings are you referring to? –  Ken Jun 25 '10 at 20:25
@Ken: Standard stuff, version of Emacs, features installed, macro's setup, etc. –  Josh K Jun 25 '10 at 21:43
I've been using versions of vi and emacs for decades, and I haven't noticed that emacs varies across installation any more than vi does. You even had to qualify the 2 versions of vi ("VI[M]") in your response. :-) –  Ken Jun 29 '10 at 23:10
@Ken: VIM much more prevalent then VI, however the question stipulated VI. My issue with emacs is mostly the high amount of encouraged user customization see link will mean if I sit down at your computer there is a good chance it will be different then how I have emacs setup. –  Josh K Jun 29 '10 at 23:41
If you mean personal customization, I've seen no evidence that emacs is different from vim in this regard. Every vim-using colleague I have is just as extreme a customizer as my emacs-using colleagues. –  Ken Jun 30 '10 at 21:04

Vi is a better option, because it's part of the unix standard, so any unix machine you ever use, should have it installed. This includes Linux, Solaris, BSD etc. It's worth learning the basics of it, just for that reason.

There are plenty of arguments for the merits of each online - a lot of it just comes down to personal taste.

-

Choose emacs and vi(m) is a personal choice.

Install cygwin on your windows machine and install both emacs and vim. Read about them and try using them. Whichever you prefer is the right choice for you.

I started off using emacs and then switched to vim. It is all personal. The issue can actually become a heated debate amount the right/wrong people.

-

Text editors usually support VIM keybindings more commonly than they do emacs. Learn vi once, use it over and over again.

-
Except bash supports emacs keybindings (thank RMS for that one). –  davr Jun 25 '10 at 21:04
You can do set -o vi to change bash into supporting vi bindings.. –  Dentrasi Jun 26 '10 at 8:32

Well, you'd be better off at this point picking a Linux distro than an editor, because in all likelihood, your BASH book assumes you're using Linux.

I suggest installing Ubuntu under VirtualBox, then trying both vi & emacs. If you prefer one over the other, use that. But overall, it wouldn't hurt to know enough of both to open, edit, and save a file, without destroying it or your keyboard in the process.

-
I think maybe I wasn't 100% clear, I did get a ubuntu distro and I am reading a book to learn bash on the ubuntu machine. However before just getting this linux machine I don't have much linux experience mostly just windows experience. –  JD Isaacks Jun 25 '10 at 20:24
Ok, no problem. I recommended Linux because trying to follow a BASH book with Cygwin may have caused some frustration. Regardless of what you prefer, at some point you're probably going to need to use vi, so I suggest that you at least learn what I mentioned - open, edit and save. This is the minimum for any text editor. The crux of the vi(m)/emacs debate is that they are both fully featured editing/programming environments. So they do a lot more than just open/edit/save. But you don't need to learn all of that if you don't want to. But you do need to know how to open/edit/save. –  Joe Internet Jun 26 '10 at 1:05

Neither. Picking up emacs or vi(m) to learn a programming language or other computer skill means you have to learn how to use a text editor at the same time you're learning to program. Use Notepad. Or Notepad++. On Linux, gedit or Kate.

-

Neither of the editors are available by default in Windows, so it really does not matter.

Choice of either Vi or Emacs is definitely an acquired taste and you need to acquire it if you are going to be working in Unix command line a lot.

Vi is a standard tool that is available in every environment and by the virtue of this alone, it is probably better tool to learn at least basic skill set of using vi.

Emacs is on the other hand a bit closer to how most of the editors work (e.g. no separate command, navigation and editing mode) and quite a few shell environments use same standard key bindings as Emacs for line editing.

In any case - if you are looking for a good and powerful text editor for windows, I suggest taking look at E-text editor

-

If you are just looking to edit files from the command line, I'd recommend nano. It's nowhere near as sophisticated as emacs or vi, but sometimes that,s exactly what's needed.

-
I can't stand meta chords, something nano embraces with a passion. –  Josh K Jun 25 '10 at 19:22
@JoshK If you don't like meta chords, then you won't like Emacs. –  Trey Jackson Jun 25 '10 at 20:41
@Trey: I don't like Emacs. –  Josh K Jun 25 '10 at 21:25
@JoshK Then there's your answer to the question. –  Trey Jackson Jun 26 '10 at 15:34
This is a slightly surreal thread... –  Rich Bradshaw Jun 27 '10 at 14:14

BOTH, you can never learn to much! Then decide for yourself which one you like better.

-