diff options
author | Bram Moolenaar <Bram@vim.org> | 2013-06-12 21:29:15 +0200 |
---|---|---|
committer | Bram Moolenaar <Bram@vim.org> | 2013-06-12 21:29:15 +0200 |
commit | ec7944aaf2d5fd67b7bd59a69d6a393424b6c8f8 (patch) | |
tree | d578871973ba7c87e0337dbe90b61d75de667100 /runtime/doc/indent.txt | |
parent | cab465a6d7a7d158c99b04ddc81650b468d82227 (diff) | |
download | vim-git-ec7944aaf2d5fd67b7bd59a69d6a393424b6c8f8.tar.gz |
Update runtime files.
Diffstat (limited to 'runtime/doc/indent.txt')
-rw-r--r-- | runtime/doc/indent.txt | 46 |
1 files changed, 45 insertions, 1 deletions
diff --git a/runtime/doc/indent.txt b/runtime/doc/indent.txt index 0dd632b0c..7e89059b1 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. |