diff options
author | Karthik Krishnan <karthik.krishnan@kitware.com> | 2008-01-16 16:53:53 (GMT) |
---|---|---|
committer | Karthik Krishnan <karthik.krishnan@kitware.com> | 2008-01-16 16:53:53 (GMT) |
commit | 25e00a332ba9451d4899814f77b3eadb7febd180 (patch) | |
tree | 285a5c4467de90f7ca49125dfed1a64ea511611e /Docs | |
parent | a06dcdba970b5ea1cf570de1a9f7f038af849496 (diff) | |
download | CMake-25e00a332ba9451d4899814f77b3eadb7febd180.zip CMake-25e00a332ba9451d4899814f77b3eadb7febd180.tar.gz CMake-25e00a332ba9451d4899814f77b3eadb7febd180.tar.bz2 |
ENH: ~/CMake/src/Docs
* Additions for cmake-command highligting.
* Additions for operator-highlighting
Diffstat (limited to 'Docs')
-rw-r--r-- | Docs/cmake-indent.vim | 6 | ||||
-rw-r--r-- | Docs/cmake-syntax.vim | 8 |
2 files changed, 8 insertions, 6 deletions
diff --git a/Docs/cmake-indent.vim b/Docs/cmake-indent.vim index 6ecf800..f149873 100644 --- a/Docs/cmake-indent.vim +++ b/Docs/cmake-indent.vim @@ -11,7 +11,7 @@ " Vim indent file " Language: CMake (ft=cmake) " Author: Andy Cedilnik <andy.cedilnik@kitware.com> -" Maintainer: Andy Cedilnik <andy.cedilnik@kitware.com> +" Maintainer: Karthik Krishnan <karthik.krishnan@kitware.com> " Last Change: $Date$ " Version: $Revision$ " @@ -66,8 +66,8 @@ fun! CMakeGetIndent(lnum) \ ')\s*' . \ '\(' . cmake_regex_comment . '\)\?$' - let cmake_indent_begin_regex = '^\s*\(IF\|MACRO\|FOREACH\|ELSE\|ELSEIF\|WHILE\)\s*(' - let cmake_indent_end_regex = '^\s*\(ENDIF\|ENDFOREACH\|ENDMACRO\|ELSE\|ELSEIF\|ENDWHILE\)\s*(' + let cmake_indent_begin_regex = '^\s*\(IF\|MACRO\|FOREACH\|ELSE\|ELSEIF\|WHILE\|FUNCTION\)\s*(' + let cmake_indent_end_regex = '^\s*\(ENDIF\|ENDFOREACH\|ENDMACRO\|ELSE\|ELSEIF\|ENDWHILE\|ENDFUNCTION\)\s*(' " Add if previous_line =~? cmake_indent_comment_line " Handle comments diff --git a/Docs/cmake-syntax.vim b/Docs/cmake-syntax.vim index 54523e5..17c2b32 100644 --- a/Docs/cmake-syntax.vim +++ b/Docs/cmake-syntax.vim @@ -11,7 +11,7 @@ " Vim syntax file " Language: CMake " Author: Andy Cedilnik <andy.cedilnik@kitware.com> -" Maintainer: Andy Cedilnik <andy.cedilnik@kitware.com> +" Maintainer: Karthik Krishnan <karthik.krishnan@kitware.com> " Last Change: $Date$ " Version: $Revision$ " @@ -43,12 +43,14 @@ syn region cmakeArguments start=/(/ end=/)/ syn keyword cmakeSystemVariables \ WIN32 UNIX APPLE CYGWIN BORLAND MINGW MSVC MSVC_IDE MSVC60 MSVC70 MSVC71 MSVC80 syn keyword cmakeOperators - \ AND BOOL CACHE COMMAND DEFINED DOC EQUAL EXISTS FALSE GREATER INTERNAL LESS MATCHES NAME NAMES NAME_WE NOT OFF ON OR PATH PATHS PROGRAM STREQUAL STRGREATER STRING STRLESS TRUE + \ 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 \ contained 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 \ nextgroup=cmakeArguments + +" The keywords are generated as: cmake --help-command-list | tr "\n" " " syn keyword cmakeStatement - \ 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 ENDIF ENDWHILE EXEC_PROGRAM EXECUTE_PROCESS EXPORT_LIBRARY_DEPENDENCIES FILE FIND_FILE FIND_LIBRARY FIND_PACKAGE FIND_PATH FIND_PROGRAM FLTK_WRAP_UI FOREACH 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 USE_MANGLED_MESA UTILITY_SOURCE VARIABLE_REQUIRES VTK_MAKE_INSTANTIATOR VTK_WRAP_JAVA VTK_WRAP_PYTHON VTK_WRAP_TCL WHILE WRITE_FILE ENDMACRO + \ 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 USE_MANGLED_MESA UTILITY_SOURCE VARIABLE_REQUIRES VTK_MAKE_INSTANTIATOR VTK_WRAP_JAVA VTK_WRAP_PYTHON VTK_WRAP_TCL WHILE WRITE_FILE \ nextgroup=cmakeArguments syn keyword cmakeTodo \ TODO FIXME XXX |