I recently found that there is a command in Vim called compiler. You can call it with any common compiler (for example, :compiler gcc, :compiler php, etc.), but it doesn’t seem to have any immediate effect.
I searched on the manpages but didn’t find anything useful about what it actually does, nor does the Vim Wiki. Does anyone know what that command actually does?
It sets options for that compiler, such as the program to use for
:makeand the format of error messages so vim can jump you to error locations. Look in$VIMRUNTIME/compiler/for the different .vim files that can be sourced.:help write-compiler-pluginSee also
:help errorformatand:help makeprg.Here’s the GCC compiler file on my machine, for example:
/usr/share/vim/vim72/compiler/gcc.vim