[Geany-Devel] Find/highlight matching opening/closing HTML tag
elextr at xxxxx
Wed Mar 27 23:07:26 UTC 2013
On 28 March 2013 09:47, Volodymyr Kononenko <vmkononenko at gmail.com> wrote:
> Hi all,
> I am software developer and I am using Geany almost every day. Let it be a
> short introduction :)
> I found out that Geany does not have a feature, mentioned in mail subject.
> Is anybody busy with it?
> A little googling showed me, that this feature is in Geany wishlist. So, I
> wish to implement it.
> After the brief investigation I've found, that it may be implemented in
> on_update_ui (src/editor.c) by checking active lexer, and if it is HTML,
> then calling editor_highlight_html_tag function (or something like this).
You should do language specific stuff in a plugin, you can connect to
the editor-notify signal. Just ensure you return false.
> Is it OK to implement on the editor level, or you think it would be correct
> to implement on the Scintilla lexer level (LexHTML.cxx)? Please, suggest.
I assume you want to make it work like brace matching, when the cursor
is in/next to a tag highlight the opposing tag.
It is probably not possible to implement in the lexer as it won't be
called for changes to the cursor position.
> Best regards,
> Volodymyr Kononenko
> Devel mailing list
> Devel at lists.geany.org
More information about the Devel