By default vim aligns lines inside LI tags on the same position as the position of LI tag, but I want the contents of LI to have deeper indentation.

Current behaviour:

first line
second line

I want:

    first line
    second line

Is this possible?

1 Answer 1


You can try this html plugin.

You can then customize it to your needs. As the plugin page says, you can specify which html tags get indented more:

You can add further tags with 

  :let g:html_indent_inctags = "html,body,head,tbody" 

You can remove tags with 

  :let g:html_indent_autotags = "th,td,tr,tfoot,thead" 

so in your case simply:

:let g:html_indent_inctags = "li,ul";

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.