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

Eugene Arshinov earshinov at xxxxx
Tue Nov 2 20:28:43 UTC 2010


On Tue, 2 Nov 2010 15:13:12 +0000%
Nick Treleaven <nick.treleaven at btinternet.com> wrote:

> On Fri, 29 Oct 2010 21:56:53 +0400
> Eugene Arshinov <earshinov at gmail.com> wrote:
> 
> > > 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?
> 
> I think just add a html_tag_autoindentation field to
> GeanyFiletypePrivate and use that.
> 

Okay, the patch is attached.  I named the field 'xml_indent_tags' and
the filetype property 'indent_tags'.  By default (like all fields in
GeanyFiletypePrivate) it is zero, but in global filetypes.{xml,html} I
set it to true.

Best regards,
Eugene.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: geany.24.xml_autoindent_filetype_pref.r5335.patch
Type: text/x-patch
Size: 3057 bytes
Desc: not available
URL: <http://lists.geany.org/pipermail/devel/attachments/20101102/605e1eb0/attachment.bin>


More information about the Devel mailing list