[Geany] Snippets - support for variable values in multiple places?
Lex Trotman
elextr at xxxxx
Wed May 11 23:06:21 UTC 2011
On 11 May 2011 22:59, Jean-Daniel Bonjour <Jean-Daniel.Bonjour at epfl.ch> wrote:
> On Wed May 11 10:30:31 UTC 2011 Eugene Arshinov wrote:
>
>> I have one more suggestion: new %selection% parameter
>> for current selection. It will make sense when used
>> together with snippet keybindings. For example, some users may find
>> it useful to create HTML snippets like s=<strong>%selection%</strong>
>> and assign keybindings to them. Gedit provides this functionality via
>> $GEDIT_SELECTED_TEXT [1] (though I must note that Gedit snippets
>> are generally more powerful than Geany's as for today). Currently I
>> don't feel the need for such functionality myself (for me, HTML
>> editing is already comfortable enough with tag autocompletion enabled),
>> but recently I received a private mail from another user who talked
>> precisely about that.
>
>
> Yes, I spoke privately with Eugene about such a useful feature to be
> implemented in Geany. (This would allow me to give up with Gedit).
>
>
> Another way to solve my problem would be to define a user-Keybinding
> executing a sequence of Geany or user Keybindings, in this case the sequence
> of the following keybindings :
> <ctrl-X> (to cut the selection)
> <ctrl-alt-S> (to insert HTML tags)
> <ctrl-V> (to past the clipboard between 2 tags)
>
> with the snippet :
> strong=<strong>%cursor%</strong>
> and the Keybinding :
> [Keybindings]
> strong=<Ctrl><Alt>s
>
>
What that needs is being able to define macros and bind them to keys.
This would be a great feature and can be implemented in a plugin using
GTK signal features. As you can tell I had a quick look before I ran
out of all coding time.
Cheers
Lex
> --
> Best regards,
> Jean-Daniel
>
> _______________________________________________
> Geany mailing list
> Geany at uvena.de
> https://lists.uvena.de/cgi-bin/mailman/listinfo/geany
>
More information about the Users
mailing list