Running geany 1.37. I am currently using geany to write css, html and twig files. I have seen many use an editor called sublime but I am sticking with geany.
One of the capabilities of sublime is being able to type eg.:
.myclass
and have it converted to
<div class="myclass">
</div>
.myclass is of course only an example and I am looking for a macro that would allow me to type . + some class name and have it converted analogously to above. While I have extended the auto-completion capabilities by editing snippets.conf, this will not work for my use case above since the class name can/should be anything I choose.
Does anyone know how to do this?
On Wed, 13 Mar 2024 at 07:53, H via Users users@lists.geany.org wrote:
Running geany 1.37. I am currently using geany to write css, html and twig files. I have seen many use an editor called sublime but I am sticking with geany.
One of the capabilities of sublime is being able to type eg.:
.myclass
and have it converted to
<div class="myclass">
</div>
.myclass is of course only an example and I am looking for a macro that would allow me to type . + some class name and have it converted analogously to above. While I have extended the auto-completion capabilities by editing snippets.conf, this will not work for my use case above since the class name can/should be anything I choose.
This is a very specific use-case that "somebody" can write a plugin to provide, perhaps as an expansion of the xml snippets plugin. Its unlikely to be added to Geany itself.
Cheers Lex
Does anyone know how to do this?
Users mailing list -- users@lists.geany.org To unsubscribe send an email to users-leave@lists.geany.org
On 03/12/2024 06:50 PM, Lex Trotman via Users wrote:
On Wed, 13 Mar 2024 at 07:53, H via Users users@lists.geany.org wrote:
Running geany 1.37. I am currently using geany to write css, html and twig files. I have seen many use an editor called sublime but I am sticking with geany.
One of the capabilities of sublime is being able to type eg.:
.myclass
and have it converted to
<div class="myclass">
</div>
.myclass is of course only an example and I am looking for a macro that would allow me to type . + some class name and have it converted analogously to above. While I have extended the auto-completion capabilities by editing snippets.conf, this will not work for my use case above since the class name can/should be anything I choose.
This is a very specific use-case that "somebody" can write a plugin to provide, perhaps as an expansion of the xml snippets plugin. Its unlikely to be added to Geany itself.
Cheers Lex
Does anyone know how to do this?
Users mailing list -- users@lists.geany.org To unsubscribe send an email to users-leave@lists.geany.org
Users mailing list -- users@lists.geany.org To unsubscribe send an email to users-leave@lists.geany.org
I looked very quickly at the description of XML Snippets and the functionality seems quite similar to TAB Autocompletion.
Not sure how easy it would be to use that code and write a plugin to accomplish the type of autocompletion I am looking for. I think I would like the following action in my plugin:
I type '.' followed by other characters excluding a white space (this would be the class name), then hit TAB and a code snippet would be generated that also uses the class name just entered (excluding the '.').
Perhaps I could try my hand at if someone more experienced writing plugins would be willing to guide me?