cmake/Auxiliary/vim/cmake.vim.in

104 lines
3.0 KiB
VimL
Raw Normal View History

2016-10-30 18:24:19 +01:00
" Vim syntax file
2018-01-26 17:06:56 +01:00
" Program: CMake - Cross-Platform Makefile Generator
" Version: @VERSION@
2016-10-30 18:24:19 +01:00
" Language: CMake
2018-01-26 17:06:56 +01:00
" Author: Andy Cedilnik <andy.cedilnik@kitware.com>,
" Nicholas Hutchinson <nshutchinson@gmail.com>,
" Patrick Boettcher <patrick.boettcher@posteo.de>
" Maintainer: Dimitri Merejkowsky <d.merej@gmail.com>
" Former Maintainer: Karthik Krishnan <karthik.krishnan@kitware.com>
2018-04-23 21:13:27 +02:00
" Last Change: @DATE@
2016-10-30 18:24:19 +01:00
"
" Licence: The CMake license applies to this file. See
" https://cmake.org/licensing
" This implies that distribution with Vim is allowed
if exists("b:current_syntax")
finish
endif
2018-01-26 17:06:56 +01:00
let s:keepcpo= &cpo
set cpo&vim
2016-10-30 18:24:19 +01:00
2018-01-26 17:06:56 +01:00
syn region cmakeComment start="#" end="$" contains=cmakeTodo,cmakeLuaComment,@Spell
2016-10-30 18:24:19 +01:00
syn region cmakeLuaComment start="\[\z(=*\)\[" end="\]\z1\]" contains=cmakeTodo,@Spell
2017-07-20 19:35:53 +02:00
syn match cmakeEscaped /\(\\\\\|\\"\|\\n\|\\t\)/ contained
syn region cmakeRegistry start="\[" end="]" contained oneline contains=cmakeTodo,cmakeEscaped
syn region cmakeGeneratorExpression start="$<" end=">" contained oneline contains=cmakeVariableValue,cmakeProperty,cmakeGeneratorExpressions,cmakeTodo
2018-01-26 17:06:56 +01:00
syn region cmakeString start='"' end='"' contained contains=cmakeTodo,cmakeVariableValue,cmakeEscaped
2017-07-20 19:35:53 +02:00
syn region cmakeVariableValue start="${" end="}" contained oneline contains=cmakeVariable,cmakeTodo
syn region cmakeEnvironment start="$ENV{" end="}" contained oneline contains=cmakeTodo
2018-01-26 17:06:56 +01:00
syn region cmakeArguments start="(" end=")" contains=ALLBUT,cmakeCommand,cmakeCommandConditional,cmakeCommandRepeat,cmakeCommandDeprecated,cmakeArguments,cmakeTodo
2016-10-30 18:24:19 +01:00
syn case match
2017-07-20 19:35:53 +02:00
syn keyword cmakeProperty contained
2018-01-26 17:06:56 +01:00
@PROPERTIES@
2016-10-30 18:24:19 +01:00
2017-07-20 19:35:53 +02:00
syn keyword cmakeVariable contained
2016-10-30 18:24:19 +01:00
@VARIABLE_LIST@
2017-07-20 19:35:53 +02:00
syn keyword cmakeModule contained
2016-10-30 18:24:19 +01:00
@MODULES@
@KEYWORDS@
2017-07-20 19:35:53 +02:00
syn keyword cmakeGeneratorExpressions contained
2016-10-30 18:24:19 +01:00
@GENERATOR_EXPRESSIONS@
syn case ignore
2017-07-20 19:35:53 +02:00
2016-10-30 18:24:19 +01:00
syn keyword cmakeCommand
@COMMAND_LIST@
\ nextgroup=cmakeArguments
2017-07-20 19:35:53 +02:00
2016-10-30 18:24:19 +01:00
syn keyword cmakeCommandConditional
@CONDITIONALS@
\ nextgroup=cmakeArguments
2017-07-20 19:35:53 +02:00
2016-10-30 18:24:19 +01:00
syn keyword cmakeCommandRepeat
@LOOPS@
\ nextgroup=cmakeArguments
2017-07-20 19:35:53 +02:00
2016-10-30 18:24:19 +01:00
syn keyword cmakeCommandDeprecated
@DEPRECATED@
\ nextgroup=cmakeArguments
2017-07-20 19:35:53 +02:00
2016-10-30 18:24:19 +01:00
syn case match
syn keyword cmakeTodo
\ TODO FIXME XXX
\ contained
hi def link cmakeCommand Function
hi def link cmakeCommandConditional Conditional
hi def link cmakeCommandDeprecated WarningMsg
hi def link cmakeCommandRepeat Repeat
hi def link cmakeComment Comment
hi def link cmakeEnvironment Special
hi def link cmakeEscaped Special
hi def link cmakeGeneratorExpression WarningMsg
2017-07-20 19:35:53 +02:00
hi def link cmakeGeneratorExpressions Constant
2016-10-30 18:24:19 +01:00
hi def link cmakeLuaComment Comment
hi def link cmakeModule Include
hi def link cmakeProperty Constant
hi def link cmakeRegistry Underlined
hi def link cmakeString String
hi def link cmakeTodo TODO
hi def link cmakeVariableValue Type
2017-07-20 19:35:53 +02:00
hi def link cmakeVariable Identifier
2016-10-30 18:24:19 +01:00
@KEYWORDS_HIGHLIGHT@
let b:current_syntax = "cmake"
2018-01-26 17:06:56 +01:00
let &cpo = s:keepcpo
unlet s:keepcpo
2018-04-23 21:13:27 +02:00
" vim: set nowrap: