all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Sharon Kimble <boudiccas@skimble.plus.com>
To: Danny YUE <sheepduke@gmail.com>
Cc: help-emacs <help-gnu-emacs@gnu.org>
Subject: Re: Simple keybinding request
Date: Sun, 09 Apr 2017 14:03:42 +0100	[thread overview]
Message-ID: <8737dhg2c1.fsf@skimble.plus.com> (raw)
In-Reply-To: <87inmdyj77.fsf@gmail.com> (Danny YUE's message of "Sun, 09 Apr 2017 18:22:04 +0800")

[-- Attachment #1: Type: text/plain, Size: 993 bytes --]

Danny YUE <sheepduke@gmail.com> writes:

> 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:
>

Thanks for replying Danny.

> # -*- 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.

I didn't know about '$0' so thanks for that, its working very nicely.

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 --]

  reply	other threads:[~2017-04-09 13:03 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 [this message]
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

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=8737dhg2c1.fsf@skimble.plus.com \
    --to=boudiccas@skimble.plus.com \
    --cc=help-gnu-emacs@gnu.org \
    --cc=sheepduke@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.