help-gnu-emacs
[Top][All Lists]
Advanced

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

Re: some vi equivalents please?


From: Xah
Subject: Re: some vi equivalents please?
Date: Fri, 31 Oct 2008 15:49:08 -0700 (PDT)
User-agent: G2/1.0

On Oct 31, 10:34 am, Giorgos Keramidas <keram...@ceid.upatras.gr>
wrote:
> On 31 Oct 2008 17:22:15 GMT, Joost Kremers <joostkrem...@yahoo.com> wrote:
>
> > Giorgos Keramidas wrote:
> >>     (global-set-key (kbd "C-c R") 'query-replace-regexp)
> >>     (global-set-key (kbd "<f4>") 'query-replace-regexp)
>
> > note that query-replace-regexp is already bound to C-M-%. though if
> > you use it a lot (i don't) it may be more convenient to choose a less
> > demanding key combo. C-M-% requires holding down Control, Alt, Shift
> > and '5' simultaneously...
>
> Ah, I didn't notice `C-M-%'.  Thank you.
>
> On the other hand, in my desktop holding down Alt & Shift at the same
> time switches between English and Greek input, so you are right that a
> more convenient key is probably going to be nice :-)

alternative solution is just to give it a alias.

So, i have

(defalias 'qr 'query-replace)
(defalias 'qrr 'query-replace-regex)

Alias makes many frequently used command easy, esp when you already
have too many shortcuts to remember or don't have key space.

Recently query-replace and query-replace-regex are incorporated into
my ergo keyboard with just “Alt+5” and “Alt+Shift+5” (e.g. “Alt+%”).
(see http://xahlee.org/emacs/ergonomic_emacs_keybinding.html )

also, the orignial poster might be interested in:

(defalias 'lml 'list-matching-lines)
(defalias 'dml 'delete-matching-lines)

delete-matching-lines is just a alias to the “flush-lines” too. The
“flush-lines” is a 1980's terminology, it's probably best to not
spread it.

  Xah
∑ http://xahlee.org/

reply via email to

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