help-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Simple keybinding request


From: Danny YUE
Subject: Re: Simple keybinding request
Date: Sun, 09 Apr 2017 18:22:04 +0800
User-agent: mu4e 0.9.18; emacs 25.2.1

On 2017-04-09 10:05, Sharon Kimble <address@hidden> 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



reply via email to

[Prev in Thread] Current Thread [Next in Thread]