I am not happy with the behavior of the indent/html.vim file, so I made a custom one in ~/.vim/indent/html.vim. However, vim -V2 still revealed to me that the /usr/share/vim/vim80/indent/html.vim is still sourced.

How do I prevent the latter from being sourced? I don't really want to remove that file manually and I am afraid I will than have to do that every time I update my system.

  • 3
    Did you include a let b:did_indent = 1 in your custom indent script? The default indent scripts check for the existence of this variable and exit early if it is defined. – Jürgen Krämer May 22 at 14:01
  • Another option is exists("*HtmlIndent"). That is looking for the function HtmlIndent to be defined. Not sure which script is run first, but if it's your custom indent than either of these options should work. – Tumbler41 May 22 at 14:04

Your Answer

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

Browse other questions tagged or ask your own question.