The One True Text Editor
eecs.harvard.edu
eecs.harvard.edu
> Emacs is based in Lisp. 'Nuff said.
What is that supposed to mean?
You can
critize Elisp for not having lexically scoped
variables (although there is lexical-let in 'cl)
or tail-call optimization. But the above
"statement"
sounds as if he has never looked at Elisp code.
Btw. if you are new to Emacs, make sure to have
the sources installed as well - you can then
look at the implementation of every function
with C-h f function-name
and then selecting the filename (this is also true
of the functions and special forms written in C).
If you do this for a while, you will recognize
that the Emacs programming model makes sense - and
it's not so much because of or in spite of Lisp
- it's more because of the Emacs-specific
abstractions (point, buffers, markers,
buffer-local variables, ...) that are quite different
from the usual paradigms most of us are used to,
but nevertheless very powerful for text-munging. > Vi commands are a Unix standard.
yeah, but bash (for example) and other programs
using the Readline library default to Emacs keybindings... > Cleaner interface. Only one line is used
> up for commands; everything else is your text.
> Easy to read. Good.
ok, my Emacs uses two lines (one for the modeline
and one for the minibuffer). Of course, ed has
a much cleaner interface than both Vi/Emacs..."Ed is generous enough to flag errors, yet prudent enough not to overwhelm the novice with verbosity."
At least the people who write scripts for Emacs do it because they like the editor and enjoy extending it with (Emacs)Lisp. The people who write scripts for Vim do it because they love their editor more then they can't stand Vim Script.
vimpulse.el extends ViperMode with Vim features. http://www.emacswiki.org/emacs/vimpulse
I'm not denouncing emacs, a lot of people I hold in very high regard would commit suicide if they couldn't use it, I'm just saying that emacs is like Richard Stallman: An indisputable genius, but to work with him you have to do things his way, and share his beliefs about the world. Which I don't.
I'm thinking that the issue is rather that when you learn your first editor (emacs or vi), you don't have other good text editors as reference so you swallow the learning curve and keep pushing. When learning the second one, its harder to justify the learning effort.
There are ony two subjects contending for the top spot in 'the most flamewar attraction power graph', the first is significant whitespace in python, the second is Vi vs Emacs (and to avoid starting a flamewar by choosing a particular order, I'll repeat them alphabetically, Emacs vs Vi).
The rest of the subjects (MySQl vs postgresql, Windows vs Linux and so on) are mild by comparison.
One day there will be an 'emacs machine' that boots straight into emacs, current unices are just used as scaffolding during this unfortunate but necessary stage.
EDIT: Thanks for the downmod, in this topic it is expected I guess... :)
Here is the reference for the quote:
http://www.freesoftwaremagazine.com/columns/gnu_emacs_22_wor...
So anyway, has anyone used Viper much? I notice it has WIZARD mode which claims to keep all of your Emacs customizations and keys working. So is Viper just for Vi refugees in an Emacs world or might it be useful for a Emacs user wanting to see what it's all about?
As a hardcore Emacs user, I am seriously tempted by Viper. It is all the good stuff about vi, but without having to use vi (or give up anything in Emacs). I have tried it, and it is not exactly what I want, but it is certainly close. (I have used Vim, and it is everything that I don't want.)
Think of Viper as vi + emacs, where Vim is vi + <something else>. This is why Vim users don't like Viper.
I usually have several emacs sessions suspended and ready for me to work on with an fg command, but I have also written a script that lets me easily use cat to append to or create a new text file from the command line, when I just want to add a little without waiting for a new emacs session to load.
'Nuff said indeed.
Vim is for people who want to process text efficiently.
Typically, software with such a high level of integration sucks. It's a collection of mediocre tools rather than one excellent tool.
My combination of Vim + irssi + mutt + ddd is greater than any emacs tools as they are cherry picked to be the best at their job rather than the most integrated. I know. I binned emacs for them.
Emacs is effectively a somewhat less harsh form of vendor lock in.
Anyway, I disagree on your comments about integration. Vim, irssi, mutt, and ddd all use separate keybinding semantics. Switch programs, and everything you know about using your software is thrown out the window -- now you are doing something totally new. Repeat several times a day.
Integration affords the possibilities for greater reuse. I wrote an extension for managing "projects". Thanks to eshell, I can easily manage my projects from the command-line now, not just when I am editing files in emacs. (And, there are no hacks involved; no forking a process every time I want my editor to open another file in the project, as would be required if you wanted to do this with vi and bash.)
It's a collection of mediocre tools rather than one excellent tool.
Maybe the stuff you write is...
It's all down to opinion, which I chose to share. Now some replies which are all my opinion again.
a) All my keybindings are approximately vim-like. Mutt uses vim as an editor. I use the mouse for ddd (nail me to a cross for my sins). irssi mainly involves: type stuff, whack enter.
b) Blue is my favourite colour (particularly oceandeep.vim).
c) Revelation: I avoid "project management" tools. That is what the filesystem and the related tools are for.
d) Regarding forking, UNIX was designed to be small utilities working together to build systems greater than the sum of it's parts, not one monolithic environment. Otherwise they wouldn't have added the fork() syscall would they? Hence, in vim, whack bang (!) and type a shell command. Pipe stuff in, get stuff out.
e) I admit, my writing style is terrible.
..zzZZ
Emacs tools are not any more tightly coupled because they're written in Emacs Lisp than your tools are because they're written in C.
In fact, just as all your tools run in a terminal, all my Emacs tools run in buffers (in Emacs). Speaking loosely, Emacs is the embodiment of Unix: it has many tools written by the community, some of which are installed by default, and you can choose which you want to run that best suit your needs. "Integration" doesn't really fit into the picture.
For example, Emacs has both ERC and rcirc. I use ERC, but my point is that there are choices. Emacs has several mail readers (Wanderlust, GNUs, mew, etc) and several terminal emulators. Eshell provides one type of feel, treating your shell as a buffer. Term provides a more classic terminal emulator feel, when you don't want to treat your term like a text editing session.
As to your "! is text in, text out", try M-! in Emacs. I daresay Emacs has fairly robust system integration as well. I have run irssi from term buffers for fun. Even more ironic is running vi in a term buffer. In short, it may be more useful for you to think of Emacs as a replacement for your terminal emulator than as a replacement for vi.