Skip to content

Calling functions with optional arguments from the mini-buffer

Surely one of the first things VIers want to know as do the rest of us is how to move forward N characters (or backward or whatever) from the mini-buffer in EMACS. Here is how it is done, using the universal argument. So to move forward 100 chars:

C:u 100, C:f

ADDENDUM:01/13/13

Thanks FUCO for providing a better solution:

There’s also a faster way. Just hold down control key (or meta key, by default the binding is on both) and type the number, then execute the command or invoke minibuffer with M-x

So, C-2 C-0 C-f will move you 20 characters. It’s neat because you don’t have to release control, you just hit the rest of the keys in sequence.

2 Comments

  1. Fuco wrote:

    There’s also a faster way. Just hold down control key (or meta key, by default the binding is on both) and type the number, then execute the command or invoke minibuffer with M-x

    So, C-2 C-0 C-f will move you 20 characters. It’s neat because you don’t have to release control, you just hit the rest of the keys in sequence.

    Sunday, January 13, 2013 at 05:55 | Permalink
  2. Grant wrote:

    FUCO:

    Thanks!

    Sunday, January 13, 2013 at 08:29 | Permalink

One Trackback/Pingback

  1. The Universal Argument | Irreal on Tuesday, January 15, 2013 at 03:19

    [...] at Wisdom and Wonder, Grant tells us how to move forward several spaces in the minibuffer. That’s just 【Ctrl+u 1 0 0 Ctrl+f】, of course but Fuco (who wowed us by doing the last [...]

Post a Comment

Your email is never published nor shared. Required fields are marked *
*
*