From: Sharon Kimble <boudiccas@skimble.plus.com>
To: Yuri Khan <yuri.v.khan@gmail.com>
Cc: help-emacs <help-gnu-emacs@gnu.org>
Subject: Re: Simple keybinding request
Date: Sun, 09 Apr 2017 13:49:36 +0100 [thread overview]
Message-ID: <87k26tg2zj.fsf@skimble.plus.com> (raw)
In-Reply-To: <CAP_d_8X3C151Xxju=hymjZx3SkesoaqFm+ydMOAhEuPuuuMdsg@mail.gmail.com> (Yuri Khan's message of "Sun, 9 Apr 2017 18:46:55 +0700")
[-- Attachment #1: Type: text/plain, Size: 1594 bytes --]
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
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 818 bytes --]
next prev parent reply other threads:[~2017-04-09 12:49 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-04-09 10:05 Simple keybinding request Sharon Kimble
2017-04-09 10:22 ` Danny YUE
2017-04-09 13:03 ` Sharon Kimble
2017-04-09 16:12 ` Danny YUE
2017-04-09 11:46 ` Yuri Khan
2017-04-09 12:49 ` Sharon Kimble [this message]
2017-04-22 0:59 ` Emanuel Berg
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=87k26tg2zj.fsf@skimble.plus.com \
--to=boudiccas@skimble.plus.com \
--cc=help-gnu-emacs@gnu.org \
--cc=yuri.v.khan@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.