[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: make undo operate as in (no flames please) vim

From: Xah Lee
Subject: Re: make undo operate as in (no flames please) vim
Date: Sat, 24 Jan 2009 23:41:03 -0800 (PST)
User-agent: G2/1.0

On Jan 24, 4:43 pm, Harry Putnam <address@hidden> wrote:
> I've used emacs for a goodly number of yrs now.  I'd say though that
> my usage is considerably less sophisticated than many users here.
> One thing I've actually come to dread is using undo.  I've never taken
> the time to get this setup in some way that seems more useful to me.
> I always just go for the `C-x u' repeatedly or else preface with some
> number (C-u 20 C-x u) to get close if lots of undos are needed.
> I often hit `C-x-u' (forgetting to release the C-x part) which brings
> me to `upcase-region', which I keep disabled; that means I'm whisked
> to a lengthy message about using `upcase-region' and generally
> completely disrupting what I was doing.
> This is of my own making and not a fault of emacs, but still I'd like
> to have the undo behavior I find in vim.  It seems way closer to what
> I usually want.  Where I press some keycombo and a whole sentence or
> whatever is undone.  Instead of `C-x u' repeatedly to undo the same
> line or even paragraph of type.
> I don't want to go to viper-mode. That seems a bit drastic, but can
> anyone tell me how to setup `undo' to behave more like the undo found
> in vim?

Here's what i do:

(global-unset-key (kbd "C-/")) ; undo
(global-unset-key (kbd "C-_")) ; undo

;; undo and redo
(global-set-key (kbd "M-Z") 'redo)
(global-set-key (kbd "M-z") 'undo)

you'll need to install the redo mode. You can find it on .

i use a full ergonomic based shortcut you might be interested.

not sure exactly what vi undo behaves... perhaps you want emacs to
lengeth each steps it consider for undo... don't have answer for that
off hand. But if viper mode does it, you can easily customize emacs to
do that without viper too.


reply via email to

[Prev in Thread] Current Thread [Next in Thread]