sponsor Vim development Vim logo Vim Book Ad

cmake.vim : Incorporates CMake support to Vim.

 script karma  Rating 6/9, Downloaded by 2730  Comments, bugs, improvements  Vim wiki

created by
Jacky Alciné
 
script type
utility
 
description
cmake.vim 0.4.1 is a Vim plugin that allows you to use CMake within Vim for your projects. This is alpha-grade software and may turn your CMake project into a cat-overrun Telnet session.

If lost, run :help cmake for a bit of guidance.

# Requirements
At the time of writing, cmake.vim has been tested with Vim 7.3+ in nocp mode and CMake 2.8.

# Getting Started
After you installed the plugin, just cd into the directory where the top-level CMakeLists.txt can be found and run:

" Create a new binary directory for your clean project.
:CMakeCreateProject <build-dir-name>

" Build all of the targets.
:CMakeBuild

With that, you created (or re-configured in a vanilla-setup) a new binary directory and built the project.

# Commands
cmake.vim defines a few methods for generic interaction with CMake. Check out :help cmake-methods for more information.

# Options
In order for CMake to operate, it has to know where the build directory is located. This is done automatically by the plugin but it does need help in the event that you happen to build your CMake project in a sub-directory. Check out :help cmake-options for more information.

# Integrations
See :help cmake-integrations for tips on integrations cmake.vim with other plug-ins like Syntastic or YouCompleteMe. Long story short, it's freaking awesome but could use some work. With this version, the integrations are now target-specific, allowing for fine-grained integration for every single file.
 
install details
# Installing

I recommending using Vundle to install plugins. The line necessary to add this plugin is as follows:

Bundle 'jalcine/cmake.vim`
 

rate this script Life Changing Helpful Unfulfilling 
script versions (upload new version)

Click on the package to download.

package script version date Vim version user release notes
vim-cmake-0.5.4.tar.gz 0.5.4 2015-03-19 7.0 Jacky Alciné better checking for targets within individual buffers.
vim-cmake-0.5.3.tar.gz 0.5.3 2015-03-19 7.0 Jacky Alciné patches to improve buffer detection.
cmake.vim-0.5.2.tar.gz 0.5.2 2015-03-10 7.4 Jacky Alciné This release includes the following:

  * Improved support for Syntastic.
  * Better file discovery support for Ninja builds.
  * Stabilized test suite on local machines.
  * Choosing all-global commands instead of buffer specific commands.
  * Support of out-of-source builds in conjunction to the classic in-source builds.
cmake-0.5.1.tar.gz 0.5.1 2015-01-16 7.0 Jacky Alciné Add information about similar projects to cmake.vim and provided newer Ruby gems for testing.
v0.4.5.tar.gz 0.4.5 2014-10-18 7.0 Jacky Alciné updated - includes bugfix for ft detection and better testing.
v0.4.4.tar.gz 0.4.4 2014-10-18 7.0 Jacky Alciné (backported) Add more support for YCM.
v0.4.3.tar.gz 0.4.3 2014-08-16 7.0 Jacky Alciné Purely test changes to make them a bit faster.
v0.4.2.tar.gz 0.4.2 2014-07-17 7.3 Jacky Alciné Includes a test suite and allows for better control.
v0.1.9-1.tar.gz 0.1.9-1 2013-09-27 7.3 Jacky Alciné Improved support for Vimux with absolute file path resolution.
v0.1.9.tar.gz 0.1.9 2013-09-26 7.3 Jacky Alciné Initial upload
ip used for rating: 13.58.252.8

If you have questions or remarks about this site, visit the vimonline development pages. Please use this site responsibly.
Questions about Vim should go to the maillist. Help Bram help Uganda.
   
Vim at Github