[Geany-devel] question about snippets
am at xxxxx
Sat Jul 4 12:06:12 UTC 2009
One functionality that I _always_ wanted to have for snippet-completion,
is using snippets on a selected text. So that I have "some text"
selected in the editor, then type a hotkey, then type some chars, like
e.g. d-i-v and then I get:
in my editor.
Basically one would need an additional parameter (like %selected%) for
the snippets.conf, so you'll get something like e.g.:
For normal snippet-completion with tab, %selected% would be treated
When the special hotkey is pressed, every further char must be "eaten"
and the resulting string must be checked against a list of snippets and
when a snippet is matched it is inserted around the selected text in
I hacked something like that together using the Lua-plugin and it works
pretty well and I think it's extremely useful especially for
html/xml-editing, so I'm thinking about redoing it in C.
The question is: Would something like this be better as a separate
plugin or added to standard snippet-completion?
More information about the Devel