[Top][All Lists]

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

Re: Simple keybinding request

From: Yuri Khan
Subject: Re: Simple keybinding request
Date: Sun, 9 Apr 2017 18:46:55 +0700

On Sun, Apr 9, 2017 at 5:05 PM, Sharon Kimble
<address@hidden> wrote:

> How can I bind '<ref name="%"/>' to some keys to make it easier to enter
> please? I've got it as a yasnippet but its using 5 keys to enter it, and
> if I can just use say 3 keys it will speed things up. What it actually
> does is to enter a citation-repeat in mediawiki-mode.

I was going to suggest yasnippet but I see you’re already using that :)

I assume the 5 keys you have now are `< r e f TAB`. If not, please elaborate.

You can shorten that to `< r TAB` by editing the snippet (M-x
yas-visit-snippet-file), changing the `# key: <ref` line to `# key:
<r` and installing the changed snippet with `C-c C-c`.

You could do away with the initial `<` if you didn’t ever need to use
the snippet immediately after a word, like `foo<ref…`. However, with
footnotes and references, you often do, so you need a non-letter at
the start of the key.

Alternatively, you could bind the snippet directly to a key by
specifying a `# binding:` directive in the snippet file. For example,
`# binding: M-r` or `# binding: C-c w r`.

reply via email to

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