[geeks] vi vs. emacs - rational discussion
Jonathan C. Patschke
jp at celestrion.net
Sat Apr 3 01:11:31 CST 2004
On Fri, 2 Apr 2004, Bill Bradford wrote:
> I learned vi when I first touched a unix box.
Same here.
> I now use VIM, solely for color syntax highlighting.
Same here, and split-screens in a screen in a fat-by-tall rxvt.
> Why (if any reasons), should I consider learning Emacs?
One of the really neat things I like about Emacs is the easy access to a
lisp interpreter. Don't want to learn lisp? Just use it for simple
things:
C-x b *scratch*
(* 24234 34234)
C-j
And Emacs happily replies with 24320388, the product of 24234 and
34234. Then you can C-x RET to get back to what you were working on.
The +, -, /, and % (modulo) arithmetic functions work similarly.
You can even use it to help you decide what you want for lunch:
(defun pick-x (theList x) (if (= x 0) (car theList)
(pick-x (cdr theList) (- x 1))))
(defun pick-random (theList x)
(pick-x theList (abs (% (random) (length theList)))))
(setq lunch-options '(burger sub indian mexican chinese))
(pick-random lunch-options)
And Emacs says I need Indian food.
On a more serious note, being able to run a shell interactively in a
buffer is very useful, since you can cut-and-paste from within Emacs.
Granted, if you're a screen user, you've already got all that.
> (note: I have vi movement/editing commands hardwired into my
> brain by this point)
Emacs is pretty easy. Largely, you just use the arrow keys and cursor-
movement keys like in most GUI text-editors. The text-selection stuff
irritates me.
While there are a lot of things I like about Emacs, there are a lot of
things I like about vim. When I'm writing C code or shell code, I
usually use vim. When I'm writing Lisp or Scheme code, I typically use
Emacs. When I'm editing email, I use vim.
It just basically boils down to that I'm a -lot- faster with vim, and I
only rarely need the comfy stuff that Emacs provides.
--
Jonathan Patschke ) "Being on the Internet is not the same as being
Elgin, TX ( famous. That's like calling Cheetos 'dinner'."
USA ) --Metal Steve
More information about the geeks
mailing list