Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Vim syntax highlighting rules for modern CMake.

License

NotificationsYou must be signed in to change notification settings

pboettch/vim-cmake-syntax

 
 

Repository files navigation

Vim syntax highlighting rules for modern CMakeLists.txt.

Original code from KitWare.First hosted on Github by Nicholas Hutchinson.Extended and modified by Patrick Boettcher and contributors

The code of this repository is integrated in and released with CMake and is pulledinto the official cmake-distribution "from time to time".

Installation

With Pathogen

cd ~/.vim/bundlegit clone git://github.com/pboettch/vim-cmake-syntax.git

With Vundle

" inside .vimrcPlugin 'pboettch/vim-cmake-syntax'

Updating

Updating with new keywords and commands needs to be done for new releases ofCMake. Simply ensure your cmake is newer than the previous version and run:

./extract-upper-case.pl

Please file a pull-request if the diff seems reasonable.

Test

There is a ever growing test-suite based on ctest located in test/

cd <build-dir-where-ever-located>cmake path/to/this/repo/testctest

textMate grammar

A TextMate grammar can be generated using the scripttextmate-grammar-from-cmake-help.py.

This grammar can be used in editors like Visual Studio Code (actually tested with vscode).

A custom cmake executable can be provided as argument as well as the output-file(default isCMake.tmLanguage.json).

python3 textmate-grammar-from-cmake-help.py \    --cmake /path/to/cmake \    --output /path/to/CMake.tmLanguage.json

When developing, the script can be run to put the file directly into the vscode-extensionpath:

python3 textmate-grammar-from-cmake-help.py \    --cmake /path/to/cmake \    --output ~/.vscode/extensions/ms-vscode.cmake-tools-<vers>/syntaxes/CMake.tmLanguage.json

Then the extension has to be disabled, restarted and enabled again to pick up the new grammar.

About

Vim syntax highlighting rules for modern CMake.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Vim Script95.3%
  • Perl2.7%
  • CMake1.6%
  • Shell0.4%

[8]ページ先頭

©2009-2025 Movatter.jp