On 04-Aug-2013 21:53 +0200, Andy Wokula wrote:

> People, you can fill this thread with your complaints about the HTML
> indent script.
> 
> I'm the current maintainer, lately I read lots of unspecific rants here and
> there but direct feedback is rare for some reason.

First of all: Thank you for continuing the maintenance of this important
filetype. I've quickly tried it, and at least it's not worse than the
previous one ;-)

> The current version is a descendant of
> http://vim.sf.net/scripts/script.php?script_id=2075
> It's very different from the original version by J. Zellner.
> 
> I'm aware of some deficiencies, I don't mind to hear them twice.

My first complaint is not directed against you:

> The new script is included since June 12 2013.

Because Bram doesn't send out runtime updates as patches, nor are the
changes appropriately reflected in the Mercurial commit messages, this
makes it hard to follow. Especially unfortunate in this case because of
the interface change (i.e. what used to be g:html_indent_tags is now
g:html_indent_inctags with different value syntax). IMO changes like
this should be announced more prominently, at least by a separate commit
with a good summary message.


But to your new indent plugin:

1. As there are many dialects / extensions of HTML (e.g. the various
templating languages like JSP, GSP), the script is probably used for
other filetypes, too, with a changed set of tags. The current global
variables make it cumbersome to re-use the script: Save current global
vars, adapt it, runtime! indent/html.vim, restore global vars.

2. I had used the old script for Groovy Server Pages and configured
indenting for all various Groovy tags matching g:\S\+; unfortunately,
your script only supports literal tag names so far (enumerating all the
different tag libraries is close to impossible, but they all have the g:
prefix). Fortunately, your script uses \w\+ (which is too simple, see
the HTML standard, but I'd prefer you'd adhere to the XML standard,
including namespaces) to extract the tag names, so I can right now get
away with just defining a "g" tag.

3. Likewise, there are many self-closing <g:foo/> tags. I know it's not
part of HTML syntax, but your script probably should ignore (i.e. not
indent) those.

4. In HTML, I like to return to column 1 after a <pre>. This is trivial
to patch:

#v+
@@ -350,7 +350,7 @@ func! s:FreshState(lnum) "{{{

 func! s:Alien2() "{{{
     " <pre> block
-    return -1
+    return 0
 endfunc "}}}
 func! s:Alien3() "{{{
     " <script> javascript
#v-
but I'd love to have this configurable.


Thanks for being so open to feedback and willing to improve on this
crucial piece of infrastructure!

-- regards, ingo

-- 
-- 
You received this message from the "vim_dev" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php

--- 
You received this message because you are subscribed to the Google Groups 
"vim_dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/groups/opt_out.


Raspunde prin e-mail lui