annotate runtime/syntax/cmake.vim @ 3206:a1d2f741d45c v7.3.373

updated for version 7.3.373 Problem: A tags file with an extremely long name may cause an infinite loop. Solution: When encountering a long name switch to linear search.
author Bram Moolenaar <bram@vim.org>
date Wed, 14 Dec 2011 14:15:16 +0100
parents 6d3d35ff2c2b
children d1e4abe8342c
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
836
5a7843c57316 updated for version 7.0e02
vimboss
parents:
diff changeset
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
5a7843c57316 updated for version 7.0e02
vimboss
parents:
diff changeset
4 " Language: CMake
5a7843c57316 updated for version 7.0e02
vimboss
parents:
diff changeset
5 " Author: Andy Cedilnik <andy.cedilnik@kitware.com>
2249
6d3d35ff2c2b Use full path in undofile(). Updated docs.
Bram Moolenaar <bram@vim.org>
parents: 2034
diff changeset
6 " Maintainer: Karthik Krishnan <karthik.krishnan@kitware.com>
6d3d35ff2c2b Use full path in undofile(). Updated docs.
Bram Moolenaar <bram@vim.org>
parents: 2034
diff changeset
7 " Last Change: $Date: 2008-08-25 14:31:28 $
6d3d35ff2c2b Use full path in undofile(). Updated docs.
Bram Moolenaar <bram@vim.org>
parents: 2034
diff changeset
8 " Version: $Revision: 1.10 $
836
5a7843c57316 updated for version 7.0e02
vimboss
parents:
diff changeset
9 "
5a7843c57316 updated for version 7.0e02
vimboss
parents:
diff changeset
10 " Licence: The CMake license applies to this file. See
5a7843c57316 updated for version 7.0e02
vimboss
parents:
diff changeset
11 " http://www.cmake.org/HTML/Copyright.html
5a7843c57316 updated for version 7.0e02
vimboss
parents:
diff changeset
12 " This implies that distribution with Vim is allowed
5a7843c57316 updated for version 7.0e02
vimboss
parents:
diff changeset
13
5a7843c57316 updated for version 7.0e02
vimboss
parents:
diff changeset
14 " For version 5.x: Clear all syntax items
5a7843c57316 updated for version 7.0e02
vimboss
parents:
diff changeset
15 " For version 6.x: Quit when a syntax file was already loaded
5a7843c57316 updated for version 7.0e02
vimboss
parents:
diff changeset
16 if version < 600
5a7843c57316 updated for version 7.0e02
vimboss
parents:
diff changeset
17 syntax clear
5a7843c57316 updated for version 7.0e02
vimboss
parents:
diff changeset
18 elseif exists("b:current_syntax")
5a7843c57316 updated for version 7.0e02
vimboss
parents:
diff changeset
19 finish
5a7843c57316 updated for version 7.0e02
vimboss
parents:
diff changeset
20 endif
5a7843c57316 updated for version 7.0e02
vimboss
parents:
diff changeset
21
5a7843c57316 updated for version 7.0e02
vimboss
parents:
diff changeset
22 syn case ignore
2249
6d3d35ff2c2b Use full path in undofile(). Updated docs.
Bram Moolenaar <bram@vim.org>
parents: 2034
diff changeset
23 syn match cmakeEscaped /\(\\\\\|\\"\|\\n\|\\t\)/ contained
6d3d35ff2c2b Use full path in undofile(). Updated docs.
Bram Moolenaar <bram@vim.org>
parents: 2034
diff changeset
24 syn region cmakeComment start="#" end="$" contains=cmakeTodo
6d3d35ff2c2b Use full path in undofile(). Updated docs.
Bram Moolenaar <bram@vim.org>
parents: 2034
diff changeset
25 syn region cmakeRegistry start=/\[/ end=/]/
6d3d35ff2c2b Use full path in undofile(). Updated docs.
Bram Moolenaar <bram@vim.org>
parents: 2034
diff changeset
26 \ contained oneline contains=CONTAINED,cmakeTodo,cmakeEscaped
6d3d35ff2c2b Use full path in undofile(). Updated docs.
Bram Moolenaar <bram@vim.org>
parents: 2034
diff changeset
27 syn region cmakeVariableValue start=/\${/ end=/}/
6d3d35ff2c2b Use full path in undofile(). Updated docs.
Bram Moolenaar <bram@vim.org>
parents: 2034
diff changeset
28 \ contained oneline contains=CONTAINED,cmakeTodo
6d3d35ff2c2b Use full path in undofile(). Updated docs.
Bram Moolenaar <bram@vim.org>
parents: 2034
diff changeset
29 syn region cmakeEnvironment start=/\$ENV{/ end=/}/
6d3d35ff2c2b Use full path in undofile(). Updated docs.
Bram Moolenaar <bram@vim.org>
parents: 2034
diff changeset
30 \ contained oneline contains=CONTAINED,cmakeTodo
6d3d35ff2c2b Use full path in undofile(). Updated docs.
Bram Moolenaar <bram@vim.org>
parents: 2034
diff changeset
31 syn region cmakeString start=/"/ end=/"/
6d3d35ff2c2b Use full path in undofile(). Updated docs.
Bram Moolenaar <bram@vim.org>
parents: 2034
diff changeset
32 \ contains=CONTAINED,cmakeTodo,cmakeOperators
6d3d35ff2c2b Use full path in undofile(). Updated docs.
Bram Moolenaar <bram@vim.org>
parents: 2034
diff changeset
33 syn region cmakeArguments start=/(/ end=/)/
6d3d35ff2c2b Use full path in undofile(). Updated docs.
Bram Moolenaar <bram@vim.org>
parents: 2034
diff changeset
34 \ contains=ALLBUT,cmakeArguments,cmakeTodo
836
5a7843c57316 updated for version 7.0e02
vimboss
parents:
diff changeset
35 syn keyword cmakeSystemVariables
2249
6d3d35ff2c2b Use full path in undofile(). Updated docs.
Bram Moolenaar <bram@vim.org>
parents: 2034
diff changeset
36 \ WIN32 UNIX APPLE CYGWIN BORLAND MINGW MSVC MSVC_IDE MSVC60 MSVC70 MSVC71 MSVC80 MSVC90
836
5a7843c57316 updated for version 7.0e02
vimboss
parents:
diff changeset
37 syn keyword cmakeOperators
2249
6d3d35ff2c2b Use full path in undofile(). Updated docs.
Bram Moolenaar <bram@vim.org>
parents: 2034
diff changeset
38 \ 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
39 \ contained
836
5a7843c57316 updated for version 7.0e02
vimboss
parents:
diff changeset
40 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
41 \ nextgroup=cmakeArguments
836
5a7843c57316 updated for version 7.0e02
vimboss
parents:
diff changeset
42
2249
6d3d35ff2c2b Use full path in undofile(). Updated docs.
Bram Moolenaar <bram@vim.org>
parents: 2034
diff changeset
43 " The keywords are generated as: cmake --help-command-list | tr "\n" " "
6d3d35ff2c2b Use full path in undofile(). Updated docs.
Bram Moolenaar <bram@vim.org>
parents: 2034
diff changeset
44 syn keyword cmakeStatement
6d3d35ff2c2b Use full path in undofile(). Updated docs.
Bram Moolenaar <bram@vim.org>
parents: 2034
diff changeset
45 \ 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
46 \ nextgroup=cmakeArguments
6d3d35ff2c2b Use full path in undofile(). Updated docs.
Bram Moolenaar <bram@vim.org>
parents: 2034
diff changeset
47 syn keyword cmakeTodo
6d3d35ff2c2b Use full path in undofile(). Updated docs.
Bram Moolenaar <bram@vim.org>
parents: 2034
diff changeset
48 \ TODO FIXME XXX
6d3d35ff2c2b Use full path in undofile(). Updated docs.
Bram Moolenaar <bram@vim.org>
parents: 2034
diff changeset
49 \ contained
836
5a7843c57316 updated for version 7.0e02
vimboss
parents:
diff changeset
50
5a7843c57316 updated for version 7.0e02
vimboss
parents:
diff changeset
51 " Define the default highlighting.
5a7843c57316 updated for version 7.0e02
vimboss
parents:
diff changeset
52 " For version 5.7 and earlier: only when not done already
5a7843c57316 updated for version 7.0e02
vimboss
parents:
diff changeset
53 " For version 5.8 and later: only when an item doesn't have highlighting yet
5a7843c57316 updated for version 7.0e02
vimboss
parents:
diff changeset
54 if version >= 508 || !exists("did_cmake_syntax_inits")
5a7843c57316 updated for version 7.0e02
vimboss
parents:
diff changeset
55 if version < 508
5a7843c57316 updated for version 7.0e02
vimboss
parents:
diff changeset
56 let did_cmake_syntax_inits = 1
5a7843c57316 updated for version 7.0e02
vimboss
parents:
diff changeset
57 command -nargs=+ HiLink hi link <args>
5a7843c57316 updated for version 7.0e02
vimboss
parents:
diff changeset
58 else
5a7843c57316 updated for version 7.0e02
vimboss
parents:
diff changeset
59 command -nargs=+ HiLink hi def link <args>
5a7843c57316 updated for version 7.0e02
vimboss
parents:
diff changeset
60 endif
5a7843c57316 updated for version 7.0e02
vimboss
parents:
diff changeset
61
5a7843c57316 updated for version 7.0e02
vimboss
parents:
diff changeset
62 HiLink cmakeStatement Statement
5a7843c57316 updated for version 7.0e02
vimboss
parents:
diff changeset
63 HiLink cmakeComment Comment
5a7843c57316 updated for version 7.0e02
vimboss
parents:
diff changeset
64 HiLink cmakeString String
5a7843c57316 updated for version 7.0e02
vimboss
parents:
diff changeset
65 HiLink cmakeVariableValue Type
5a7843c57316 updated for version 7.0e02
vimboss
parents:
diff changeset
66 HiLink cmakeRegistry Underlined
5a7843c57316 updated for version 7.0e02
vimboss
parents:
diff changeset
67 HiLink cmakeArguments Identifier
5a7843c57316 updated for version 7.0e02
vimboss
parents:
diff changeset
68 HiLink cmakeArgument Constant
5a7843c57316 updated for version 7.0e02
vimboss
parents:
diff changeset
69 HiLink cmakeEnvironment Special
5a7843c57316 updated for version 7.0e02
vimboss
parents:
diff changeset
70 HiLink cmakeOperators Operator
5a7843c57316 updated for version 7.0e02
vimboss
parents:
diff changeset
71 HiLink cmakeMacro PreProc
2249
6d3d35ff2c2b Use full path in undofile(). Updated docs.
Bram Moolenaar <bram@vim.org>
parents: 2034
diff changeset
72 HiLink cmakeError Error
6d3d35ff2c2b Use full path in undofile(). Updated docs.
Bram Moolenaar <bram@vim.org>
parents: 2034
diff changeset
73 HiLink cmakeTodo TODO
6d3d35ff2c2b Use full path in undofile(). Updated docs.
Bram Moolenaar <bram@vim.org>
parents: 2034
diff changeset
74 HiLink cmakeEscaped Special
836
5a7843c57316 updated for version 7.0e02
vimboss
parents:
diff changeset
75
5a7843c57316 updated for version 7.0e02
vimboss
parents:
diff changeset
76 delcommand HiLink
5a7843c57316 updated for version 7.0e02
vimboss
parents:
diff changeset
77 endif
5a7843c57316 updated for version 7.0e02
vimboss
parents:
diff changeset
78
5a7843c57316 updated for version 7.0e02
vimboss
parents:
diff changeset
79 let b:current_syntax = "cmake"
5a7843c57316 updated for version 7.0e02
vimboss
parents:
diff changeset
80
5a7843c57316 updated for version 7.0e02
vimboss
parents:
diff changeset
81 "EOF"