Update runtime files

This commit is contained in:
Bram Moolenaar
2020-07-10 22:00:53 +02:00
parent a7eedf317a
commit 7ff78465f7
21 changed files with 690 additions and 420 deletions

View File

@ -10,5 +10,5 @@ test:
VIMRUNTIME=$(VIMRUNTIME) $(VIM) --clean --not-a-term -u testdir/runtest.vim
clean:
clean testclean:
rm -f testdir/*.fail testdir/*.out

View File

@ -1,9 +1,8 @@
" Vim indent script for HTML
" Header: "{{{
" Maintainer: Bram Moolenaar
" Original Author: Andy Wokula <anwoku@yahoo.de>
" Last Change: 2020 Jun 18
" Version: 1.0
" Last Change: 2020 Jul 06
" Version: 1.0 "{{{
" Description: HTML indent script with cached state for faster indenting on a
" range of lines.
" Supports template systems through hooks.
@ -587,7 +586,7 @@ func! s:Alien3()
return eval(b:hi_js1indent)
endif
if b:hi_indent.scripttype == "javascript"
return GetJavascriptIndent()
return eval(b:hi_js1indent) + GetJavascriptIndent()
else
return -1
endif

View File

@ -2,6 +2,16 @@
" START_INDENT
<html>
<body>
<style>
div#d1 { color: red; }
div#d2 { color: green; }
</style>
<script>
var v1 = "v1";
var v2 = "v2";
</script>
<div>
<div>
text
@ -32,5 +42,25 @@ dt text
</dt>
</dl>
</body>
</html>
" END_INDENT
% START_INDENT
% INDENT_EXE let g:html_indent_style1 = "inc"
% INDENT_EXE let g:html_indent_script1 = "zero"
% INDENT_EXE call HtmlIndent_CheckUserSettings()
<html>
<body>
<style>
div#d1 { color: red; }
div#d2 { color: green; }
</style>
<script>
var v1 = "v1";
var v2 = "v2";
</script>
</body>
</html>
% END_INDENT

View File

@ -2,35 +2,65 @@
" START_INDENT
<div>
<div>
text
</div>
</div>
<html>
<body>
<style>
div#d1 { color: red; }
div#d2 { color: green; }
</style>
<script>
var v1 = "v1";
var v2 = "v2";
</script>
<div>
<div>
text
</div>
</div>
<div
class="foo bar">
text
</div>
<div
class="foo bar">
text
</div>
<div class="foo bar"
data="something">
text
</div>
<div class="foo bar"
data="something">
text
</div>
<div class="foo
bar">
text
</div>
<div class="foo
bar">
text
</div>
<dl>
<dd>
dd text
</dd>
<dt>
dt text
</dt>
</dl>
<dl>
<dd>
dd text
</dd>
<dt>
dt text
</dt>
</dl>
</body>
</html>
" END_INDENT
% START_INDENT
% INDENT_EXE let g:html_indent_style1 = "inc"
% INDENT_EXE let g:html_indent_script1 = "zero"
% INDENT_EXE call HtmlIndent_CheckUserSettings()
<html>
<body>
<style>
div#d1 { color: red; }
div#d2 { color: green; }
</style>
<script>
var v1 = "v1";
var v2 = "v2";
</script>
</body>
</html>
% END_INDENT