1

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.)

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

1 Answer 1

1

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?
  cindent
        Last set from /usr/share/vim/vim74/indent/javascript.vim
:verbose set indentexpr?
  indentexpr=

Or for Python:

:verbose set cindent? 
  nocindent
:verbose set indent
  indentexpr=GetPythonIndent(v:lnum)
        Last set from /usr/share/vim/vim74/indent/python.vim
1
  • :verbose answered my question!
    – mkpaa
    Commented Mar 3, 2016 at 15:15

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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