html - Vim: gg=G aligns left, does not auto-indent -


When I try to fix the indentation of an HTML file with gg = G , Then every row is lost and left - right? Does anyone know what can be done here?

test.html

  & lt; Html & gt; & Lt; Top & gt; & Lt; Meta http-equiv = "content-type" content = "text / html; charset = utf-8" & gt; & Lt; Title & gt; Indent Test & lt; / Title & gt; & Lt; / Head & gt; & Lt; Body & gt; & Lt; Div id = "test" & gt; & Lt; Div id = "test2" & gt; & Lt; / Div & gt; & Lt; / Div & gt; & Lt; / Body & gt; & Lt; / Html & gt;  

test.html after running GG = G:

  & lt; Html & gt; & Lt; Top & gt; & Lt; Meta http-equiv = "content-type" content = "text / html; charset = utf-8" & gt; & Lt; Title & gt; Indent Test & lt; / Title & gt; & Lt; / Head & gt; & Lt; Body & gt; & Lt; Div id = "test" & gt; & Lt; Div id = "test2" & gt; & Lt; / Div & gt; & Lt; / Div & gt; & Lt; / Body & gt; & Lt; / Html & gt; Vimrc "Thomas" "This file contains tips and ideas from various sources, since it is for personal use, I I am lazy about "delivering a credit" "Thanks, everybody." "Basics" ----------------------- --- "Search is case-insensitive. To disable the use / search string / I temporarily Set to Unknown "Some plug-ins require this to work. Not sure what this does" Auto-indent feature set AI "on the file type plugin" Astikics "----------- --------------- Given: zenburn_high_Contrast = 1 Issue: zenburn_alternate_Visual = 1 Colorscheme Zenburn Set Line = 53 Set Column = 130 "From Line Number On Default Number "Turn off annoying error bell set noerrorbell set set visual block t_vb =" Show tabs and see http://docs.google.com/ behind the whitespace? Docid = dfkkkxv5_65d5p3nk if (& Terminocoding == "UTF-8") if we: version> = 700 set list list list = tab: »\, mark: ·, is spread: ..., nbsp; ‗ and set list list list = tab: »\, Mark: ·, extends: (" gui_running ") ... endif else if v: version> gt; = 700 set list listchars = tab: & gt; \, mark:., F Li Hui: & gt ;, nbsp; _ else set list listchars = tab: & gt; \, Mark:., Is expanded: & gt; Andyf Andyf If Andrew is the syntax on "Basic Recovery" ((('syntax') & amp; amp; amp; (& amp; amp; amp; amp; amp; amp; amp; amp; amp; amp; amp; & quot; 2);) (syntax) ------ "Set backup backup set backupdir = ~ / .vim / backup directory in all the temporary and backup files in directory = ~ / .vim / tmp" Good large viminfo file set viminfo = '1000, f1 ,: 1000, / 1000 set Enable History = 500 "Function Keys" ------------------------- "F7 - The whole file map of the indent ", lieutenant; F7 & gt; Mzgg = G'z & lt; CR & gt; "F3 - Toggle Highlight Search Set HLSH! Nnoremap : Set HLSH!    

You will need to enable loading of indentation files for specific file types. This line should be used for your .vimrc ...

  Type the file on the plugin  

. On this:

  the file type plugin indent  
< P> ... then restart the VIM and try again.

See: help filetype-indent-on For more information.


Comments