[Geany-devel] HTML/XML autoindentation - Re: [PATCH] Some editor/snippets/keybindings enhancements

Eugene Arshinov earshinov at xxxxx
Fri Oct 29 17:56:53 UTC 2010


On Fri, 29 Oct 2010 15:31:37 +0100%
Nick Treleaven <nick.treleaven at btinternet.com> wrote:

> On Thu, 28 Oct 2010 23:27:53 +0400
> Eugene Arshinov <earshinov at gmail.com> wrote:
> 
> > > I think we could add a per-filetype indent mode option so it
> > > would be easy to disable in case someone wanted to. The user
> > > could then set auto-indent to basic for HTML.
> > 
> > I assume it's necessary to give users an opportunity to control
> > automatic indentation of tags (HTML) and braces (JS/PHP)
> > independently.  I suggest making the new "indent_mode" option a
> 
> I wasn't thinking of brace autoindentation. In that case perhaps it's
> simpler to add a HTML-specific setting to disable tag autoindentation.
> 

It makes sense, but since now I could not find an acceptable way to
implement it.  I've just discovered that GeanyFiletype's are stored
in a pointer array, so instead of ordinary GeanyFiletype for HTML we
may add to the array an instance of hypothetical HtmlFiletype
{ GeanyFiletype parent; gboolean enable_tag_autoindentation } and of
course write some code to load enable_tag_autoindentation from filetype
config.  Is it OK?

Best regards,
Eugene.



More information about the Devel mailing list