Comment Emacs Myths (Score 1) 412
I want to dispel some myths that are recurring here. I make reference to vi, vim and Eclipse to help explain.
First of: To answer the question:
A great command is M-Q. This is a minimal requirement for any good text editor IMPO.
My recommended
(custom-set-variables
'(make-backup-files nil)
'(inhibit-splash-screen t))
Emacs is a pig?
There is some talk about Emacs being a heavy text editor and that installs lots of stuff when you install it. In response to that:
- For the Windows binary (http://ftp.gnu.org/gnu/emacs/windows/emacs-22.3-bin-i386.zip) is 37MB. There is no installation required, you just extract the zip and run the 'runemacs.exe' command in the bin directory.
- If you want to build Emacs on FreeBSD (for example) you will have to install all of it's build and runtime dependencies. That's a lot of stuff. It will want gnu build tools and X etc. If you pkg_add -r emacs to get the binary, you are not going to have to install as much. The point is: Depending on your OS and package manager you may have a different experience installing Emacs. In the case of Windows it's super easy. Not using Emacs because installing it is difficult just isn't a reality. (sure there are edge cases)
- Emacs 22.3(latest) runs at about 20 or 25 MB resident memory in the latest Ubuntu(ubuntu8041) package and FreeBSD(7.0-R) port. To get a perspective, this is about as much as gnome-terminal. If you don't know if you are using gnome-terminal: If you use gnome2 (Ubuntu) the default terminal is gnome-terminal. (I personally use xterm with some
- Emacs loads quickly (depending at what you want to run at init) and is small enough for most jobs. You will always be able to make the argument the vi is lighter. Yet for me I use Emacs everywhere someone might use vi.
- Emacs also has an emacsclient executable that connects to an emacs server. This allows multiple 'clients' to connect to the server. It makes loading emacs quicker and multiple instances can share memory. I never use it because Emacs isn't that resource intensive in a modern Desktop environment. Even in my VMs.
Emacs vs. Vi (and [insert editor here]):
For the programmer and for text editing intensive work: From what I can tell comparing vi to Emacs, Emacs wins. Comparing vim to Emacs might be more appropriate.
Power in text editors vary. Because there is variance we can say that one is more powerful than the other. That said, Emacs is the more powerful than vi (Remember I said this is a general statement. Such statements are helpful for newcomers to get a perspective not to state a holy war). Textmate, Vim, Eclipse and Visual Studio are all great at many different things. I think the reason we talk about vi and Emacs so much as because they run in terminals and fit into the average Unix user's work-flow much better. They are also old school as well as new school. Those other editors are better described as GUI IDEs. Of all of these vi is the lightest (smaller install, less memory). This is not a statement about what is better. Better is much more relative to the task at hand and the user's preference.
The power of Emacs reveals itself when the editing is beyond basic conf file editing. One could even argue that vi is also too powerful for editing a conf file. But I guess that all depends on how you want to edit conf files. If you do a lot of other things in Emacs (as most users do) then editing a conf file is just one more thing you are doing. I guess it's important to ask why you would use vi if you already have an Emacs instance running? (Remember you can even edit a file over ssh or even FTP)
Emacs as an OS?
In some contexts it's a fair comparison. A better comparison would be to a development platform. Eclipse and Eclipse RCP come to mind (http://wiki.eclipse.org/index.php/Rich_Client_Platform).
Emacs does have dired. (C-x d) This allows the user to access the file system. So if you are using Emacs on Windows or Unix, using dired will be the same. That's an example of how you might compare it to an OS.
You might say that Emacs is a great platform to build an IDE on top of. Like SLIME (The Superior Lisp Interaction Mode for Emacs) or some other ones mentioned in this thread.
Emacs Lisp vs VI's language
Like Emacs, vi also has it's own programming language. It's not a Lisp though. So where it would inherently be less powerful (http://www.paulgraham.com/avg.html go to where it says "The Blub Paradox") it might be more appealing to non-lispers.
Points/Summary/Disclaimer:
- I'm not a "vi user", but I use it as needed. I ask about vi a lot.
- Another helpful generalization is "vi is for admins, Emacs is for programmers."
- Vi is more ubiquitous on *nix than Emacs.
- Vi is lighter weight.
- Emacs is more expansive and powerful. Where it can be used like a simple text editor it can also be turned into a full fledged IDE.
- One might write an IDE on Emacs like he/she might write an IDE in Eclipse.
- I recommend Emacs even if you are a Windows programmer.
- Emacs is probably your best bet as a general purpose tool that you can use everywhere.
- Your learning curve on vi or Emacs is going to be higher than on Eclipse or Textmate.