On Wed, 10 Nov 2010 17:51:18 +0000%
Nick Treleaven <nick.trelea...@btinternet.com> wrote:

> On Tue, 2 Nov 2010 23:28:43 +0300
> Eugene Arshinov <earshi...@gmail.com> wrote:
> 
> > > I think just add a html_tag_autoindentation field to
> > > GeanyFiletypePrivate and use that.
> > > 
> > 
> > Okay, the patch is attached.
> 
> Thanks, applied (with some changes).
> 
> > 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.
> 
> I changed the filetype property to xml_indent_tags also, I think it's
> clearer.
> 
> I changed the code slightly to check whether the document uses the
> HTML/XML lexer rather than those filetypes, and to always read the
> property. This should allow other filetypes that have XML syntax to
> work also if the property is set.

Agree.  Thanks for update and commit.

> 
> BTW, should we set xml_indent_tags=true for PHP, Docbook filetypes?
> 

I think, yes, we should.  I attach a patch that have this changes plus
some documentation in geany.txt (if you use this patch, please
regenerate geany.html yourself as my rst2html causes most of this file
to be changed).

Best regards,
Eugene.
diff --git a/data/filetypes.docbook b/data/filetypes.docbook
index 26a7e11..8d16287 100644
--- a/data/filetypes.docbook
+++ b/data/filetypes.docbook
@@ -61,3 +61,7 @@ comment_use_indent=true
 
 # context action command (please see Geany's main documentation for details)
 context_action_cmd=
+
+# if this setting is set to true, a new line after a line ending with an
+# unclosed tag will be automatically indented
+indent_tags=true
\ No newline at end of file
diff --git a/data/filetypes.html b/data/filetypes.html
index e18ce75..f4cd2f6 100644
--- a/data/filetypes.html
+++ b/data/filetypes.html
@@ -32,7 +32,7 @@ comment_use_indent=true
 # context action command (please see Geany's main documentation for details)
 context_action_cmd=
 
-# If this setting is set to true, a new line after a line ending with an
+# if this setting is set to true, a new line after a line ending with an
 # unclosed tag will be automatically indented
 xml_indent_tags=true
 
diff --git a/data/filetypes.php b/data/filetypes.php
index 4d63874..ef80136 100644
--- a/data/filetypes.php
+++ b/data/filetypes.php
@@ -28,6 +28,10 @@ comment_use_indent=true
 # context action command (please see Geany's main documentation for details)
 context_action_cmd=
 
+# if this setting is set to true, a new line after a line ending with an
+# unclosed tag will be automatically indented
+indent_tags=true
+
 [build_settings]
 # %f will be replaced by the complete filename
 # %e will be replaced by the filename without extension
diff --git a/data/filetypes.xml b/data/filetypes.xml
index e067e3d..62dde6e 100644
--- a/data/filetypes.xml
+++ b/data/filetypes.xml
@@ -103,6 +103,6 @@ comment_use_indent=true
 # context action command (please see Geany's main documentation for details)
 context_action_cmd=
 
-# If this setting is set to true, a new line after a line ending with an
+# if this setting is set to true, a new line after a line ending with an
 # unclosed tag will be automatically indented
-xml_indent_tags=true
\ No newline at end of file
+xml_indent_tags=true
diff --git a/doc/geany.txt b/doc/geany.txt
index 6896419..8609583 100644
--- a/doc/geany.txt
+++ b/doc/geany.txt
@@ -3731,6 +3731,12 @@ symbol_list_sort_mode
     1       Sort tags by appearance (line number)
     =====   =====================================
 
+xml_indent_tags
+    If this setting is set to true, a new line after a line ending with an
+    unclosed XML/HTML tag will be automatically indented.  This only applies
+    to filetypes for which HTML or XML lexer is used.  Such filetypes have
+    this setting in their system configuration files.
+
 
 [build_settings] Section
 ````````````````````````
_______________________________________________
Geany-devel mailing list
Geany-devel@uvena.de
http://lists.uvena.de/cgi-bin/mailman/listinfo/geany-devel

Reply via email to