From: Andreas Politz <politza@fh-trier.de>
To: help-gnu-emacs@gnu.org
Subject: Re: make undo operate as in (no flames please) vim
Date: Sun, 25 Jan 2009 09:28:21 +0100 [thread overview]
Message-ID: <1232872165.143769@arno.fh-trier.de> (raw)
In-Reply-To: <6896a596-8fba-4641-907d-fd84c701890c@v39g2000pro.googlegroups.com>
Xah Lee wrote:
> On Jan 24, 4:43 pm, Harry Putnam <rea...@newsguy.com> 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
> emacswiki.org .
>
> i use a full ergonomic based shortcut you might be interested.
> http://code.google.com/p/ergoemacs/
>
> 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.
>
> Xah
> ∑ http://xahlee.org/
>
> ☄
Remember, vi was that mode beast. It is easier to undo the correct choice
of characters, if you tell the editor where it starts and ends (via mode
switch).
-ap
next prev parent reply other threads:[~2009-01-25 8:28 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <mailman.5688.1232844257.26697.help-gnu-emacs@gnu.org>
2009-01-25 7:41 ` make undo operate as in (no flames please) vim Xah Lee
2009-01-25 8:28 ` Andreas Politz [this message]
2009-01-25 16:59 ` Harry Putnam
2009-01-25 0:43 Harry Putnam
2009-01-25 1:04 ` Drew Adams
2009-01-25 16:51 ` Harry Putnam
2009-01-25 17:02 ` Drew Adams
2009-01-25 18:16 ` Samuel Wales
2009-01-25 19:29 ` Drew Adams
2009-01-25 19:53 ` Samuel Wales
[not found] ` <mailman.5772.1232907408.26697.help-gnu-emacs@gnu.org>
2009-01-25 19:59 ` David Kastrup
2009-01-25 20:55 ` Samuel Wales
2009-01-28 15:14 ` Ken Goldman
2009-01-28 20:21 ` Samuel Wales
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://www.gnu.org/software/emacs/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1232872165.143769@arno.fh-trier.de \
--to=politza@fh-trier.de \
--cc=help-gnu-emacs@gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).