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?
Vi and Vim Stack Exchange is a question and answer site for people using the vi and Vim families of text editors. It only takes a minute to sign up.
Sign up to join this communityIn 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?
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.