summaryrefslogtreecommitdiffstats
path: root/runtime/doc/indent.txt
diff options
context:
space:
mode:
Diffstat (limited to 'runtime/doc/indent.txt')
-rw-r--r--runtime/doc/indent.txt46
1 files changed, 45 insertions, 1 deletions
diff --git a/runtime/doc/indent.txt b/runtime/doc/indent.txt
index 0dd632b0c7..7e89059b19 100644
--- a/runtime/doc/indent.txt
+++ b/runtime/doc/indent.txt
@@ -1,4 +1,4 @@
-*indent.txt* For Vim version 7.3. Last change: 2013 May 20
+*indent.txt* For Vim version 7.3. Last change: 2013 Jun 12
VIM REFERENCE MANUAL by Bram Moolenaar
@@ -729,6 +729,50 @@ buffer-local variable as follows >
let b:fortran_indent_less=1
+HTML *ft-html-indent* *html-indent* *html-indenting*
+
+This is about variables you can set in your vimrc to customize HTML indenting.
+
+You can set the indent for the first line after <script> and <style>
+"blocktags" (default "zero"): >
+
+ :let g:html_indent_script1 = "inc"
+ :let g:html_indent_style1 = "inc"
+<
+ VALUE MEANING ~
+ "zero" zero indent
+ "auto" auto indent (same indent as the blocktag)
+ "inc" auto indent + one indent step
+
+Many tags increase the indent for what follows per default (see "Add Indent
+Tags" below in this script). You can add further tags with: >
+
+ :let g:html_indent_inctags = "html,body,head,tbody"
+
+You can also remove such tags with: >
+
+ :let g:html_indent_autotags = "th,td,tr,tfoot,thead"
+
+Default value is empty for both variables. Note: the initial "inctags" are
+only defined once per Vim session.
+
+User variables are only read when the script is sourced. To enable your
+changes during a session, without reloaind the html file, you can manually
+do: >
+
+ :call HtmlIndent_CheckUserSettings()
+
+Detail:
+ Calculation of indent inside "blocktags" with "alien" content:
+ BLOCKTAG INDENT EXPR WHEN APPLICABLE ~
+ <script> : {customizable} if first line of block
+ : cindent(v:lnum) if attributes empty or contain "java"
+ : -1 else (vbscript, tcl, ...)
+ <style> : {customizable} if first line of block
+ : GetCSSIndent() else
+ <!-- --> : -1
+
+
PHP *ft-php-indent* *php-indent* *php-indenting*
NOTE: PHP files will be indented correctly only if PHP |syntax| is active.