vim

Fork of vim, an acceptable text editor
git clone git://git.laack.co/vim.git
Log | Files | Refs | README | LICENSE

html.ok (1071B)


      1 % vim: set ft=html sw=4 ts=8 :
      2 
      3 
      4 % START_INDENT
      5 % INDENT_EXE let b:html_indent_line_limit = 64
      6 <html>
      7     <body>
      8 	<style>
      9 div#d1 { color: red; }
     10 div#d2 { color: green; }
     11 	</style>
     12 	<script>
     13 	    var v1 = "v1";
     14 	    var v2 = "v2";
     15 	</script>
     16 	<div>
     17 	    <div>
     18 		text
     19 	    </div>
     20 	</div>
     21 
     22 	<div
     23 		class="foo bar">
     24 	    text
     25 	</div>
     26 
     27 	<div class="foo bar"
     28 	     data="something">
     29 	    text
     30 	</div>
     31 
     32 	<div class="foo
     33 		    bar">
     34 	    text
     35 	</div>
     36 
     37 	<dl>
     38 	    <dd>
     39 		dd text
     40 	    </dd>
     41 	    <dt>
     42 		dt text
     43 	    </dt>
     44 	</dl>
     45 	<div
     46 		class="test"
     47 		style="color: yellow">
     48 	    text
     49 	</div>
     50 
     51     </body>
     52 </html>
     53 
     54 % END_INDENT
     55 
     56 % START_INDENT
     57 % INDENT_EXE let g:html_indent_style1 = "inc"
     58 % INDENT_EXE let g:html_indent_script1 = "zero"
     59 % INDENT_EXE let g:html_indent_attribute = 1
     60 % INDENT_EXE call HtmlIndent_CheckUserSettings()
     61 <html>
     62     <body>
     63 	<style>
     64 	    div#d1 { color: red; }
     65 	    div#d2 { color: green; }
     66 	</style>
     67 	<script>
     68 var v1 = "v1";
     69 var v2 = "v2";
     70 	</script>
     71 	<div
     72 	    class="test"
     73 	    style="color: yellow">
     74 	    text
     75 	</div>
     76     </body>
     77 </html>
     78 % END_INDENT