Mercurial > vim
annotate runtime/syntax/cmake.vim @ 9139:ddca37101ffb v7.4.1853
commit https://github.com/vim/vim/commit/28ae5773422c2cf61aaf8d9d2b9fae70642d6a33
Author: Bram Moolenaar <Bram@vim.org>
Date: Sat May 28 14:16:10 2016 +0200
patch 7.4.1853
Problem: Crash when job and channel are in the same dict while using
partials. (Luc Hermitte)
Solution: Do not decrement the channel reference count too early.
author | Christian Brabandt <cb@256bit.org> |
---|---|
date | Sat, 28 May 2016 14:30:05 +0200 |
parents | aea5ebf352c4 |
children | 43efa4f5a8ea |
rev | line source |
---|---|
836 | 1 " Vim syntax file |
2249
6d3d35ff2c2b
Use full path in undofile(). Updated docs.
Bram Moolenaar <bram@vim.org>
parents:
2034
diff
changeset
|
2 " Program: CMake - Cross-Platform Makefile Generator |
6d3d35ff2c2b
Use full path in undofile(). Updated docs.
Bram Moolenaar <bram@vim.org>
parents:
2034
diff
changeset
|
3 " Module: $RCSfile: cmake-syntax.vim,v $ |
836 | 4 " Language: CMake |
7384
aea5ebf352c4
commit https://github.com/vim/vim/commit/256972a9849b5d575b62a6a71be5b6934b5b0e8b
Christian Brabandt <cb@256bit.org>
parents:
7176
diff
changeset
|
5 " Maintainer: Dimitri Merejkowsky <d.merej@gmail.com> |
aea5ebf352c4
commit https://github.com/vim/vim/commit/256972a9849b5d575b62a6a71be5b6934b5b0e8b
Christian Brabandt <cb@256bit.org>
parents:
7176
diff
changeset
|
6 " Former Maintainer: Karthik Krishnan <karthik.krishnan@kitware.com> |
836 | 7 " Author: Andy Cedilnik <andy.cedilnik@kitware.com> |
7384
aea5ebf352c4
commit https://github.com/vim/vim/commit/256972a9849b5d575b62a6a71be5b6934b5b0e8b
Christian Brabandt <cb@256bit.org>
parents:
7176
diff
changeset
|
8 " Last Change: 2015 Dec 17 |
2249
6d3d35ff2c2b
Use full path in undofile(). Updated docs.
Bram Moolenaar <bram@vim.org>
parents:
2034
diff
changeset
|
9 " Version: $Revision: 1.10 $ |
836 | 10 " |
11 " Licence: The CMake license applies to this file. See | |
12 " http://www.cmake.org/HTML/Copyright.html | |
13 " This implies that distribution with Vim is allowed | |
14 | |
15 " For version 5.x: Clear all syntax items | |
16 " For version 6.x: Quit when a syntax file was already loaded | |
17 if version < 600 | |
18 syntax clear | |
19 elseif exists("b:current_syntax") | |
20 finish | |
21 endif | |
3496
d1e4abe8342c
Fixed compatible mode in most runtime files.
Bram Moolenaar <bram@vim.org>
parents:
2249
diff
changeset
|
22 let s:keepcpo= &cpo |
d1e4abe8342c
Fixed compatible mode in most runtime files.
Bram Moolenaar <bram@vim.org>
parents:
2249
diff
changeset
|
23 set cpo&vim |
836 | 24 |
25 syn case ignore | |
2249
6d3d35ff2c2b
Use full path in undofile(). Updated docs.
Bram Moolenaar <bram@vim.org>
parents:
2034
diff
changeset
|
26 syn match cmakeEscaped /\(\\\\\|\\"\|\\n\|\\t\)/ contained |
3557 | 27 syn region cmakeComment start="#" end="$" contains=@Spell,cmakeTodo |
2249
6d3d35ff2c2b
Use full path in undofile(). Updated docs.
Bram Moolenaar <bram@vim.org>
parents:
2034
diff
changeset
|
28 syn region cmakeRegistry start=/\[/ end=/]/ |
6d3d35ff2c2b
Use full path in undofile(). Updated docs.
Bram Moolenaar <bram@vim.org>
parents:
2034
diff
changeset
|
29 \ contained oneline contains=CONTAINED,cmakeTodo,cmakeEscaped |
6d3d35ff2c2b
Use full path in undofile(). Updated docs.
Bram Moolenaar <bram@vim.org>
parents:
2034
diff
changeset
|
30 syn region cmakeVariableValue start=/\${/ end=/}/ |
6d3d35ff2c2b
Use full path in undofile(). Updated docs.
Bram Moolenaar <bram@vim.org>
parents:
2034
diff
changeset
|
31 \ contained oneline contains=CONTAINED,cmakeTodo |
6d3d35ff2c2b
Use full path in undofile(). Updated docs.
Bram Moolenaar <bram@vim.org>
parents:
2034
diff
changeset
|
32 syn region cmakeEnvironment start=/\$ENV{/ end=/}/ |
6d3d35ff2c2b
Use full path in undofile(). Updated docs.
Bram Moolenaar <bram@vim.org>
parents:
2034
diff
changeset
|
33 \ contained oneline contains=CONTAINED,cmakeTodo |
7147
c590de398af9
commit https://github.com/vim/vim/commit/ca63501fbcd1cf9c8aa9ff12c093c95b62a89ed7
Christian Brabandt <cb@256bit.org>
parents:
3557
diff
changeset
|
34 syn region cmakeString start=/"/ end=/"/ |
2249
6d3d35ff2c2b
Use full path in undofile(). Updated docs.
Bram Moolenaar <bram@vim.org>
parents:
2034
diff
changeset
|
35 \ contains=CONTAINED,cmakeTodo,cmakeOperators |
7147
c590de398af9
commit https://github.com/vim/vim/commit/ca63501fbcd1cf9c8aa9ff12c093c95b62a89ed7
Christian Brabandt <cb@256bit.org>
parents:
3557
diff
changeset
|
36 syn region cmakeArguments start=/(/ end=/)/ |
2249
6d3d35ff2c2b
Use full path in undofile(). Updated docs.
Bram Moolenaar <bram@vim.org>
parents:
2034
diff
changeset
|
37 \ contains=ALLBUT,cmakeArguments,cmakeTodo |
836 | 38 syn keyword cmakeSystemVariables |
2249
6d3d35ff2c2b
Use full path in undofile(). Updated docs.
Bram Moolenaar <bram@vim.org>
parents:
2034
diff
changeset
|
39 \ WIN32 UNIX APPLE CYGWIN BORLAND MINGW MSVC MSVC_IDE MSVC60 MSVC70 MSVC71 MSVC80 MSVC90 |
836 | 40 syn keyword cmakeOperators |
2249
6d3d35ff2c2b
Use full path in undofile(). Updated docs.
Bram Moolenaar <bram@vim.org>
parents:
2034
diff
changeset
|
41 \ ABSOLUTE AND BOOL CACHE COMMAND DEFINED DOC EQUAL EXISTS EXT FALSE GREATER INTERNAL LESS MATCHES NAME NAMES NAME_WE NOT OFF ON OR PATH PATHS PROGRAM STREQUAL STRGREATER STRING STRLESS TRUE |
6d3d35ff2c2b
Use full path in undofile(). Updated docs.
Bram Moolenaar <bram@vim.org>
parents:
2034
diff
changeset
|
42 \ contained |
836 | 43 syn keyword cmakeDeprecated ABSTRACT_FILES BUILD_NAME SOURCE_FILES SOURCE_FILES_REMOVE VTK_MAKE_INSTANTIATOR VTK_WRAP_JAVA VTK_WRAP_PYTHON VTK_WRAP_TCL WRAP_EXCLUDE_FILES |
2249
6d3d35ff2c2b
Use full path in undofile(). Updated docs.
Bram Moolenaar <bram@vim.org>
parents:
2034
diff
changeset
|
44 \ nextgroup=cmakeArguments |
836 | 45 |
2249
6d3d35ff2c2b
Use full path in undofile(). Updated docs.
Bram Moolenaar <bram@vim.org>
parents:
2034
diff
changeset
|
46 " The keywords are generated as: cmake --help-command-list | tr "\n" " " |
7147
c590de398af9
commit https://github.com/vim/vim/commit/ca63501fbcd1cf9c8aa9ff12c093c95b62a89ed7
Christian Brabandt <cb@256bit.org>
parents:
3557
diff
changeset
|
47 syn keyword cmakeStatement |
2249
6d3d35ff2c2b
Use full path in undofile(). Updated docs.
Bram Moolenaar <bram@vim.org>
parents:
2034
diff
changeset
|
48 \ ADD_CUSTOM_COMMAND ADD_CUSTOM_TARGET ADD_DEFINITIONS ADD_DEPENDENCIES ADD_EXECUTABLE ADD_LIBRARY ADD_SUBDIRECTORY ADD_TEST AUX_SOURCE_DIRECTORY BUILD_COMMAND BUILD_NAME CMAKE_MINIMUM_REQUIRED CONFIGURE_FILE CREATE_TEST_SOURCELIST ELSE ELSEIF ENABLE_LANGUAGE ENABLE_TESTING ENDFOREACH ENDFUNCTION ENDIF ENDMACRO ENDWHILE EXEC_PROGRAM EXECUTE_PROCESS EXPORT_LIBRARY_DEPENDENCIES FILE FIND_FILE FIND_LIBRARY FIND_PACKAGE FIND_PATH FIND_PROGRAM FLTK_WRAP_UI FOREACH FUNCTION GET_CMAKE_PROPERTY GET_DIRECTORY_PROPERTY GET_FILENAME_COMPONENT GET_SOURCE_FILE_PROPERTY GET_TARGET_PROPERTY GET_TEST_PROPERTY IF INCLUDE INCLUDE_DIRECTORIES INCLUDE_EXTERNAL_MSPROJECT INCLUDE_REGULAR_EXPRESSION INSTALL INSTALL_FILES INSTALL_PROGRAMS INSTALL_TARGETS LINK_DIRECTORIES LINK_LIBRARIES LIST LOAD_CACHE LOAD_COMMAND MACRO MAKE_DIRECTORY MARK_AS_ADVANCED MATH MESSAGE OPTION OUTPUT_REQUIRED_FILES PROJECT QT_WRAP_CPP QT_WRAP_UI REMOVE REMOVE_DEFINITIONS SEPARATE_ARGUMENTS SET SET_DIRECTORY_PROPERTIES SET_SOURCE_FILES_PROPERTIES SET_TARGET_PROPERTIES SET_TESTS_PROPERTIES SITE_NAME SOURCE_GROUP STRING SUBDIR_DEPENDS SUBDIRS TARGET_LINK_LIBRARIES TRY_COMPILE TRY_RUN UNSET USE_MANGLED_MESA UTILITY_SOURCE VARIABLE_REQUIRES VTK_MAKE_INSTANTIATOR VTK_WRAP_JAVA VTK_WRAP_PYTHON VTK_WRAP_TCL WHILE WRITE_FILE |
6d3d35ff2c2b
Use full path in undofile(). Updated docs.
Bram Moolenaar <bram@vim.org>
parents:
2034
diff
changeset
|
49 \ nextgroup=cmakeArguments |
7147
c590de398af9
commit https://github.com/vim/vim/commit/ca63501fbcd1cf9c8aa9ff12c093c95b62a89ed7
Christian Brabandt <cb@256bit.org>
parents:
3557
diff
changeset
|
50 syn keyword cmakeTodo |
c590de398af9
commit https://github.com/vim/vim/commit/ca63501fbcd1cf9c8aa9ff12c093c95b62a89ed7
Christian Brabandt <cb@256bit.org>
parents:
3557
diff
changeset
|
51 \ TODO FIXME XXX |
2249
6d3d35ff2c2b
Use full path in undofile(). Updated docs.
Bram Moolenaar <bram@vim.org>
parents:
2034
diff
changeset
|
52 \ contained |
836 | 53 |
54 " Define the default highlighting. | |
55 " For version 5.7 and earlier: only when not done already | |
56 " For version 5.8 and later: only when an item doesn't have highlighting yet | |
57 if version >= 508 || !exists("did_cmake_syntax_inits") | |
58 if version < 508 | |
59 let did_cmake_syntax_inits = 1 | |
60 command -nargs=+ HiLink hi link <args> | |
61 else | |
62 command -nargs=+ HiLink hi def link <args> | |
63 endif | |
64 | |
65 HiLink cmakeStatement Statement | |
66 HiLink cmakeComment Comment | |
67 HiLink cmakeString String | |
68 HiLink cmakeVariableValue Type | |
69 HiLink cmakeRegistry Underlined | |
70 HiLink cmakeArguments Identifier | |
71 HiLink cmakeArgument Constant | |
72 HiLink cmakeEnvironment Special | |
73 HiLink cmakeOperators Operator | |
74 HiLink cmakeMacro PreProc | |
2249
6d3d35ff2c2b
Use full path in undofile(). Updated docs.
Bram Moolenaar <bram@vim.org>
parents:
2034
diff
changeset
|
75 HiLink cmakeError Error |
6d3d35ff2c2b
Use full path in undofile(). Updated docs.
Bram Moolenaar <bram@vim.org>
parents:
2034
diff
changeset
|
76 HiLink cmakeTodo TODO |
6d3d35ff2c2b
Use full path in undofile(). Updated docs.
Bram Moolenaar <bram@vim.org>
parents:
2034
diff
changeset
|
77 HiLink cmakeEscaped Special |
836 | 78 |
79 delcommand HiLink | |
80 endif | |
81 | |
82 let b:current_syntax = "cmake" | |
83 | |
3496
d1e4abe8342c
Fixed compatible mode in most runtime files.
Bram Moolenaar <bram@vim.org>
parents:
2249
diff
changeset
|
84 let &cpo = s:keepcpo |
d1e4abe8342c
Fixed compatible mode in most runtime files.
Bram Moolenaar <bram@vim.org>
parents:
2249
diff
changeset
|
85 unlet s:keepcpo |
d1e4abe8342c
Fixed compatible mode in most runtime files.
Bram Moolenaar <bram@vim.org>
parents:
2249
diff
changeset
|
86 |
836 | 87 "EOF" |