HTML indenting not working in compiled Vim 7.4, any ideas?

后端 未结 4 1411
北恋
北恋 2020-12-13 19:36

In trying to get vim to indent .html files properly, I followed the examples set out here.

Given the following file index.html

4条回答
  •  一向
    一向 (楼主)
    2020-12-13 20:00

    As mentioned in Cory's answer, the currently distributed version is Vimscript 2075. If you go to that plugin page you can see documented all the tags that by default will increase indent.

    None of the tags you gave in your example are in this default list, but there are plenty of them.

    Since indentation of HTML is very open to user preference, the plugin maintainer has included an option to add or remove tags to or from the list of tags that increases indent. See :help html-indent, where it suggests:

    You can add further tags with:
    
      :let g:html_indent_inctags = "html,body,head,tbody"
    

提交回复
热议问题