A brief howto showing how to use Geany to enclose text in HTML tags.
You need to have the Macros plugin installed and enabled to achieve this.
https://plugins.geany.org/geanymacro.html
The Debian plugin package is called: geany-plugin-macro
, though this gets installed when the overall Geany package is installed. In the gui, once installed, it can be found under the Tools
menu → Plugin Manager
menu item, where it is called: Macros and is subtitled Macros for Geany.
Edit
→ Preferences
→ Editor
→ Completions
→ XML/HTML tag auto-closing
enabled, disable it. You can re-enable it after your Macros have been recorded.Lorem ipsum dolor sit amet
.ipsum dolor
.Tools
menu → Record Macro
menu item.Shift + F2
and give the macro a name e.g. h2
.Record
button.Ctrl + c
, or using the Edit
menu → Copy
menu item.<h2>
. (Geany may autocomplete the tag by inserting the closing </h2>
tag if XML/HTML tag auto-closing
is enabled. You can still create a macro this way, but it will require more tidying up before it becomes usable.)</h2>
.stop recording macro
from the Tools
menu.Edit Macros
from the Tools
menu, and adjust what had been recorded to get it to work the way you want it to. The macro editing interface is reasonably intuitive. Ok
.
If everything has gone relatively smoothly, you should now be able to select some text in a Geany document, and then enclose it in <h2>
tags by using your assigned trigger key combination to activate this macro. Repeat the above steps for any other tag pairs you would like to use to wrap around selected slabs of text.