Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

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?

share|improve this question

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";
share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

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