Take the 2-minute tour ×
Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems.. It's 100% free, no registration required.

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:

<LI>
first line
second line

I want:

<UL>
    first line
    second line

Is this possible?

share|improve this question

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

Your Answer

 
discard

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.