Account Options

  1. Sign in
The old Google Groups will be going away soon, but your browser is incompatible with the new version.
Google Groups Home
« Groups Home
Message from discussion emacs efficiency tip: keyboard shortcuts!
The group you are posting to is a Usenet group. Messages posted to this group will make your email address visible to anyone on the Internet.
Your reply message has not been sent.
Your post was successful
 
From:
To:
Cc:
Followup To:
Add Cc | Add Followup-to | Edit Subject
Subject:
Validation:
For verification purposes please type the characters you see in the picture below or the numbers you hear by clicking the accessibility icon. Listen and type the numbers you hear
 
Dan Espen  
View profile  
 More options Jan 17, 9:48 pm
Newsgroups: comp.emacs
From: Dan Espen <des...@verizon.net>
Date: Tue, 17 Jan 2012 21:48:16 -0500
Local: Tues, Jan 17 2012 9:48 pm
Subject: Re: emacs efficiency tip: keyboard shortcuts!

Xah Lee <xah...@gmail.com> writes:
> in emacs, once you got on the train and know all the basic concepts,
> there's 1 most important aspect of increasing efficiency. That is,
> keyboard shorts (keybindings).

Good stuff.

I looked around and I didn't see a binding for "repeat-complex-command".
When I run emacs -q it tells me the default bindings are:

<again>, <redo>, C-x M-:, C-x M-ESC.

It's been a long time since I've had an "again" key on my keyboard and
I've never had a "redo" key.  The other 2 bindings are just plain nuts.
(IMO).

So, pick a key, any key, but you really want a single key assigned to
this command.

So I use xmodmap to create an F19 key and assign it to the "extra"
"page up" key in the 6 key pad.  Then I bind it like this:

(define-key global-map [(f19)] 'repeat-complex-command);; Again Key
(define-key minibuffer-local-map [(f19)] 'previous-history-element);; Again Key
(define-key minibuffer-local-map [(shift f19)] 'next-history-element);; Again Key

So, the Page Up key brings up the last "complex" command.
Keep hitting the key and you see the history.
Press shift if you go to far.

I find myself using this a lot.

I find this second binding on the same key logical:

(define-key global-map [(S-f19)] 'call-last-kbd-macro);; Shifted Again Key

Same key, but start out holding down shift and you can re-execute that
keyboard macro with one key.

--
Dan Espen


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.