[cmake-commits] alex committed cmake-indent.vim 1.7 1.8 cmake-syntax.vim 1.7 1.8

cmake-commits at cmake.org cmake-commits at cmake.org
Mon Jan 14 19:20:44 EST 2008


Update of /cvsroot/CMake/CMake/Docs
In directory public:/mounts/ram/cvs-serv26090

Modified Files:
	cmake-indent.vim cmake-syntax.vim 
Log Message:
BUG: fix vim highlighting, see #6238

Alex


Index: cmake-syntax.vim
===================================================================
RCS file: /cvsroot/CMake/CMake/Docs/cmake-syntax.vim,v
retrieving revision 1.7
retrieving revision 1.8
diff -u -d -r1.7 -r1.8
--- cmake-syntax.vim	17 Dec 2007 21:15:26 -0000	1.7
+++ cmake-syntax.vim	15 Jan 2008 00:20:42 -0000	1.8
@@ -28,34 +28,31 @@
 endif
 
 syn case ignore
-syn match cmakeComment /#.*$/ contains=cmakeReminder
-syn region cmakeRegistry start=/\[/ end=/\]/ skip=/\\[\[\]]/
-            \ contained oneline contains=CONTAINED,cmakeReminder
-syn match cmakeArgument /[^()"]+/
-            \ contained
+syn match cmakeEscaped /\(\\\\\|\\"\|\\n\|\\t\)/ contained
+syn region cmakeComment start="#" end="$" contains=cmakeTodo
+syn region cmakeRegistry start=/\[/ end=/]/
+            \ contained oneline contains=CONTAINED,cmakeTodo,cmakeEscaped
 syn region cmakeVariableValue start=/\${/ end=/}/
-            \ contained oneline contains=CONTAINED,cmakeReminder
+            \ contained oneline contains=CONTAINED,cmakeTodo
 syn region cmakeEnvironment start=/\$ENV{/ end=/}/
-            \ contained oneline contains=CONTAINED,cmakeReminder
+            \ contained oneline contains=CONTAINED,cmakeTodo
+syn region cmakeString start=/"/ end=/"/ 
+            \ contains=CONTAINED,cmakeTodo,cmakeOperators
+syn region cmakeArguments start=/(/ end=/)/ 
+            \ contains=ALLBUT,cmakeArguments,cmakeTodo
 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
-"            \ contained
-syn region cmakeString start=/"/ end=/"/ skip=/\\"/
-            \ contains=CONTAINED,cmakeReminder
-syn region cmakeArguments start=/\s*(/ end=/)/
-           \ contains=ALLBUT,cmakeArguments,cmakeReminder
+            \ 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=cmakeArgument
-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
-           \ nextgroup=cmakeArgumnts
-syn keyword cmakeReminder
-           \ TODO FIXME
-           \ contained
-
-"syn match cmakeMacro /^\s*[A-Z_]\+/ nextgroup=cmakeArgumnts
+           \ nextgroup=cmakeArguments
+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
+            \ nextgroup=cmakeArguments
+syn keyword cmakeTodo 
+            \ TODO FIXME XXX 
+            \ contained
 
 " Define the default highlighting.
 " For version 5.7 and earlier: only when not done already
@@ -78,8 +75,9 @@
   HiLink cmakeEnvironment Special
   HiLink cmakeOperators Operator
   HiLink cmakeMacro PreProc
-  HiLink cmakeError	Error
-  HiLink cmakeReminder TODO
+  HiLink cmakeError Error
+  HiLink cmakeTodo TODO
+  HiLink cmakeEscaped Special
 
   delcommand HiLink
 endif

Index: cmake-indent.vim
===================================================================
RCS file: /cvsroot/CMake/CMake/Docs/cmake-indent.vim,v
retrieving revision 1.7
retrieving revision 1.8
diff -u -d -r1.7 -r1.8
--- cmake-indent.vim	23 Sep 2006 21:09:08 -0000	1.7
+++ cmake-indent.vim	15 Jan 2008 00:20:42 -0000	1.8
@@ -25,6 +25,7 @@
 let b:did_indent = 1
 
 setlocal indentexpr=CMakeGetIndent(v:lnum)
+setlocal indentkeys+==ENDIF(,ENDFOREACH(,ENDMACRO(,ELSE(,ELSEIF(,ENDWHILE(
 
 " Only define the function once.
 if exists("*CMakeGetIndent")



More information about the Cmake-commits mailing list