I have multiple indent rules for same file type. I'd like to try them separately. How do I see which one is active? :set filetype is correct.

I did manage to change the rules by disabling all other indent files manually, but there probably is a better way?

In this case I have >5 different Javascript indent versions I'd like to test. (Mac default, Pangloss, web-indent, etc.)

  • Can you provide an example of one or more of your indent rules? It's not clear what you are sking.
    – ap0
    Oct 22 '15 at 14:59
  • Better? Rule being a indent file that (to my understanding) does the formatting when you indent lines.
    – mkpaa
    Oct 22 '15 at 19:45

Most indent files will either:

  • set indentexpr and indentkeys;
  • set cindent and cinoptions.

You can check the values by appending a question mark, and you can see where an option was set by prefixing it with :verbose. For example for JS:

:verbose set cindent?
        Last set from /usr/share/vim/vim74/indent/javascript.vim
:verbose set indentexpr?

Or for Python:

:verbose set cindent? 
:verbose set indent
        Last set from /usr/share/vim/vim74/indent/python.vim
  • :verbose answered my question!
    – mkpaa
    Mar 3 '16 at 15:15

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.