This plugin provides commands for using the build system to which the current file belongs. It searches from each files directory upwards for Makefiles and the like.
Note: If the current file does not belong to any known build systems, it will be build using associated compilers. E.g. C files will be build using gcc.
Usage Examples
CMake
Your project may look like this:
├── CMakeLists.txt
└── src/
└── main.cpp
Open any file in the project and use the following command to initialize CMake. Optional arguments can be provided:
:Build init -DCMAKE_BUILD_TYPE=ReleaseThe :Build command runs make inside the build directory. It takes
optional arguments which will be passed directly to make:
:Build build -j20
:Build build all
:Build test
:Build cleanNote: Running :Build without any arguments is equivalent to :Build build.
CMake with subdirectories
Your project may look like this:
├── CMakeLists.txt
├── src/
│ └── main.cpp
└── util/
├── CMakeLists.txt
├── util.cpp
└── misc/
├── CMakeLists.txt
└── misc.cpp
Set the current working directory to the directory containing the main CMakeLists.txt and proceed
as in the previous example:
:lchdir ~/path/to/project
:Build init -DCMAKE_BUILD_TYPE=Release
:Build
:Build --target my_targetNote: You can use this plugin to set the working directory automatically.
Autotools
Your project may look like this:
├── configure
├── Makefile.in
├── LICENSE
├── README
└── src/
└── main.c
└── foo.h
└── foo.c
Open any file in the project and configure the build using the following command. Optional configure flags can be provided:
:Build init --enable-gtk --without-foo --prefix="$HOME/.local"Then run make using the :Build command:
:Build
:Build clean
:Build build -j8 --keep-going --dry-runPlain C files
If the current file does not belong to a build system, it can be compiled
using the :Build command. This plugin defines three subcommands for C files:
:Build build
:Build run
:Build cleanPass custom arguments to the compiler:
:Build build -Wall -Wextra -Werror -pedanticNote: If :Build is called without arguments it will be equivalent to :Build build.
Python, Bash and other scripting languages
For some files which don't belong to a build system, the run target will
be defined:
:Build run
Formed in 2009, the Archive Team (not to be confused with the archive.org Archive-It Team) is a rogue archivist collective dedicated to saving copies of rapidly dying or deleted websites for the sake of history and digital heritage. The group is 100% composed of volunteers and interested parties, and has expanded into a large amount of related projects for saving online and digital history.
