[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Simple keybinding request
From: |
Sharon Kimble |
Subject: |
Re: Simple keybinding request |
Date: |
Sun, 09 Apr 2017 13:49:36 +0100 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/25.1 (gnu/linux) |
Yuri Khan <yuri.v.khan@gmail.com> writes:
> On Sun, Apr 9, 2017 at 5:05 PM, Sharon Kimble
> <boudiccas@skimble.plus.com> 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.
Thanks for replying Yuri.
Its actually bound to 'crep' (meaning citation-repeat).
>
> 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`.
Thanks for this, its now bound to 'M-s-SPC' which makes it all a lot
easier to use.
Thanks
Sharon.
--
A taste of linux = http://www.sharons.org.uk
TGmeds = http://www.tgmeds.org.uk
DrugFacts = https://www.drugfacts.org.uk
Debian 8.6, fluxbox 1.3.5-2, emacs 25.1.1.1
signature.asc
Description: PGP signature