Vim Recall繁體中文

Perform settings for a specific compiler

:compiler

Example

Normal 0 / 2

Perform settings for a specific compiler.

Buffer compiler options

makeprg
make
b:current_compiler
unset
Before & after

Before

Buffer compiler options

makeprg
make
b:current_compiler
unset

After

Buffer compiler options

makeprg
demo-build
errorformat
%f:%l:%m
b:current_compiler
demo

Documentation-backed illustration. +eval and +quickfix; runtimepath contains the shown compiler/demo.vim and no conflicting compiler/demo.vim. :compiler sources the named runtime plugin through CompilerSet; without ! these options apply locally to this buffer. It does not run a build. Primary help: :compiler.

Sample buffer
alpha
beta
gamma
Cursor on line 1, column 1
Details & Vim help

Perform settings for a specific compiler. This Ex reference uses the full command name; the alphabetical index omits arguments. Supply the ranges, arguments, flags and prerequisite state documented in the linked help. Press Enter to submit a complete command. The index spelling :comp[iler] puts the optional abbreviation suffix in square brackets; those brackets are not typed. Availability and exact behavior can depend on Vim build features, options, mappings and editor state; the linked help is authoritative.