all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Yuri Khan <yuri.v.khan@gmail.com>
To: Sharon Kimble <boudiccas@skimble.plus.com>
Cc: help-emacs <help-gnu-emacs@gnu.org>
Subject: Re: Simple keybinding request
Date: Sun, 9 Apr 2017 18:46:55 +0700	[thread overview]
Message-ID: <CAP_d_8X3C151Xxju=hymjZx3SkesoaqFm+ydMOAhEuPuuuMdsg@mail.gmail.com> (raw)
In-Reply-To: <87d1clhp69.fsf@skimble.plus.com>

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.

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`.



  parent reply	other threads:[~2017-04-09 11:46 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 [this message]
2017-04-09 12:49   ` Sharon Kimble
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='CAP_d_8X3C151Xxju=hymjZx3SkesoaqFm+ydMOAhEuPuuuMdsg@mail.gmail.com' \
    --to=yuri.v.khan@gmail.com \
    --cc=boudiccas@skimble.plus.com \
    --cc=help-gnu-emacs@gnu.org \
    /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.