From: Danny YUE <sheepduke@gmail.com>
To: Sharon Kimble <boudiccas@skimble.plus.com>
Cc: help-emacs <help-gnu-emacs@gnu.org>
Subject: Re: Simple keybinding request
Date: Sun, 09 Apr 2017 18:22:04 +0800 [thread overview]
Message-ID: <87inmdyj77.fsf@gmail.com> (raw)
In-Reply-To: <87d1clhp69.fsf@skimble.plus.com>
On 2017-04-09 10:05, 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.
>
> Thanks
> Sharon.
Try below whiling editing your new yasnippet item:
# -*- mode: snippet -*-
# name: ref
# key: ref
# --
<ref name="$0"/>
The snippet above binds the snippet to "ref" key.
'$0' makes the cursor move there after expansion completed.
Good luck.
Danny
next prev parent reply other threads:[~2017-04-09 10:22 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 [this message]
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
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
List information: https://www.gnu.org/software/emacs/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=87inmdyj77.fsf@gmail.com \
--to=sheepduke@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.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).