2

In my vimrc, I have a compiler myCompiler. When the editor starts up, everything is fine. When I switch to a new file, the compiler settings (makeprg and errorformat) revert to their defaults.

How can I set the compiler globally?

6

Use :compiler!.

From :h :compiler:

:comp[iler][!] {name}       Set options to work with compiler {name}.
                            Without the "!" options are set for the
                            current buffer.  With "!" global options are
                            set.
0

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.