r515 - in trunk/vim: debian patches
Pierre Habouzit
madcoder at costa.debian.org
Sun Mar 19 11:02:16 UTC 2006
Author: madcoder
Date: 2006-03-19 11:02:14 +0000 (Sun, 19 Mar 2006)
New Revision: 515
Added:
trunk/vim/patches/161_cmake-support.diff
Modified:
trunk/vim/debian/changelog
Log:
add cmake support (357705)
fix Dato's name: use utf8 instead of presumably latin1 ?
Modified: trunk/vim/debian/changelog
===================================================================
--- trunk/vim/debian/changelog 2006-03-19 11:00:10 UTC (rev 514)
+++ trunk/vim/debian/changelog 2006-03-19 11:02:14 UTC (rev 515)
@@ -5,6 +5,7 @@
[ Pierre Habouzit ]
* Support python `as' keyword. (closes: #352885)
+ * Add support for cmake (from cmake.org). (closes: #357705)
[ James Vega ]
* Add a missing quote in /etc/vim/vimrc's last-position-jump example.
@@ -17,9 +18,9 @@
[ Norbert Tretkowski ]
* Added patch 160_scripts.vim.diff which adds support for bzr diffs in
- scripts.vim, thanks to Adeodato Simó. (closes: #355922)
+ scripts.vim, thanks to Adeodato Simó. (closes: #355922)
- -- Norbert Tretkowski <nobse at debian.org> Sun, 19 Mar 2006 09:22:06 +0100
+ -- Pierre Habouzit <madcoder at debian.org> Sun, 19 Mar 2006 11:58:16 +0100
vim (1:6.4-007+1) unstable; urgency=low
Added: trunk/vim/patches/161_cmake-support.diff
===================================================================
--- trunk/vim/patches/161_cmake-support.diff 2006-03-19 11:00:10 UTC (rev 514)
+++ trunk/vim/patches/161_cmake-support.diff 2006-03-19 11:02:14 UTC (rev 515)
@@ -0,0 +1,204 @@
+Index: vim/runtime/filetype.vim
+===================================================================
+--- vim/runtime/filetype.vim.orig
++++ vim/runtime/filetype.vim
+@@ -259,6 +259,9 @@
+ " C#
+ au BufNewFile,BufRead *.cs setf cs
+
++" cmake
++au BufNewFile,Bufread CMakeLists.txt,*.cmake,*.cmake.in,*.ctest,*.ctest.in setf cmake
++
+ " Comshare Dimension Definition Language
+ au BufNewFile,BufRead *.cdl setf cdl
+
+Index: vim/runtime/indent/cmake.vim
+===================================================================
+--- /dev/null
++++ vim/runtime/indent/cmake.vim
+@@ -0,0 +1,94 @@
++" =============================================================================
++"
++" Program: CMake - Cross-Platform Makefile Generator
++" Module: $RCSfile: cmake-indent.vim,v $
++" Language: C++
++" Date: $Date: 2003/06/19 19:05:07 $
++" Version: $Revision: 1.2 $
++"
++" Copyright (c) 2002 Kitware, Inc., Insight Consortium. All rights reserved.
++" See Copyright.txt or http://www.cmake.org/HTML/Copyright.html for details.
++"
++" This software is distributed WITHOUT ANY WARRANTY" without even
++" the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
++" PURPOSE. See the above copyright notices for more information.
++"
++" =============================================================================
++
++" Vim indent file
++" Language: CMake (ft=cmake)
++" Author: Andy Cedilnik <andy.cedilnik at kitware.com>
++" URL: http://www.cmake.org
++" Last Change: Sun Mar 23 15:41:55 EST 2003
++
++if exists("b:did_indent")
++ finish
++endif
++let b:did_indent = 1
++
++setlocal indentexpr=CMakeGetIndent(v:lnum)
++
++" Only define the function once.
++if exists("*CMakeGetIndent")
++ finish
++endif
++
++fun! CMakeGetIndent(lnum)
++ let this_line = getline(a:lnum)
++
++ " Find a non-blank line above the current line.
++ let lnum = a:lnum
++ let lnum = prevnonblank(lnum - 1)
++ let previous_line = getline(lnum)
++
++ " Hit the start of the file, use zero indent.
++ if lnum == 0
++ return 0
++ endif
++
++ let ind = indent(lnum)
++
++ let or = '\|'
++ " Regular expressions used by line indentation function.
++ let cmake_regex_comment = '#.*'
++ let cmake_regex_identifier = '[A-Za-z][A-Za-z0-9_]*'
++ let cmake_regex_quoted = '"\([^"\\]\|\\.\)*"'
++ let cmake_regex_arguments = '\(' . cmake_regex_quoted .
++ \ or . '\$(' . cmake_regex_identifier . ')' .
++ \ or . '[^()\\#"]' . or . '\\.' . '\)*'
++
++ let cmake_indent_comment_line = '^\s*' . cmake_regex_comment
++ let cmake_indent_blank_regex = '^\s*$')
++ let cmake_indent_open_regex = '^\s*' . cmake_regex_identifier .
++ \ '\s*(' . cmake_regex_arguments .
++ \ '\(' . cmake_regex_comment . '\)\?$'
++
++ let cmake_indent_close_regex = '^' . cmake_regex_arguments .
++ \ ')\s*' .
++ \ '\(' . cmake_regex_comment . '\)\?$'
++
++ let cmake_indent_begin_regex = '^\s*\(IF\|MACRO\|FOREACH\|ELSE\)\s*('
++ let cmake_indent_end_regex = '^\s*\(ENDIF\|ENDFOREACH\|ENDMACRO\|ELSE\)\s*('
++
++ " Add
++ if previous_line =~? cmake_indent_comment_line " Handle comments
++ let ind = ind
++ else
++ if previous_line =~? cmake_indent_begin_regex
++ let ind = ind + &sw
++ endif
++ if previous_line =~? cmake_indent_open_regex
++ let ind = ind + &sw
++ endif
++ endif
++
++ " Subtract
++ if this_line =~? cmake_indent_end_regex
++ let ind = ind - &sw
++ endif
++ if previous_line =~? cmake_indent_close_regex
++ let ind = ind - &sw
++ endif
++
++ return ind
++endfun
+Index: vim/runtime/syntax/cmake.vim
+===================================================================
+--- /dev/null
++++ vim/runtime/syntax/cmake.vim
+@@ -0,0 +1,86 @@
++" =============================================================================
++"
++" Program: CMake - Cross-Platform Makefile Generator
++" Module: $RCSfile: cmake-syntax.vim,v $
++" Language: C++
++" Date: $Date: 2003/07/07 17:36:04 $
++" Version: $Revision: 1.1 $
++"
++" Copyright (c) 2002 Kitware, Inc., Insight Consortium. All rights reserved.
++" See Copyright.txt or http://www.cmake.org/HTML/Copyright.html for details.
++"
++" This software is distributed WITHOUT ANY WARRANTY" without even
++" the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
++" PURPOSE. See the above copyright notices for more information.
++"
++" =============================================================================
++
++" Vim syntax file
++" Language: CMake
++" Maintainer: Andy Cedilnik <andy.cedilnik at kitware.com>
++" Last Change: Fri Mar 21 22:33:55 EST 2003
++
++" For version 5.x: Clear all syntax items
++" For version 6.x: Quit when a syntax file was already loaded
++if version < 600
++ syntax clear
++elseif exists("b:current_syntax")
++ finish
++endif
++
++
++
++syn case match
++syn match cmakeComment /#.*$/
++syn region cmakeRegistry start=/\[/ end=/\]/ skip=/\\[\[\]]/
++ \ contained
++syn match cmakeArgument /[^()"]+/
++ \ contained
++syn match cmakeVariableValue /\${[^}]*}/
++ \ contained oneline
++syn match cmakeEnvironment /\$ENV{.*}/
++ \ contained
++syn keyword cmakeSystemVariables WIN32 UNIX APPLE
++syn keyword cmakeOperators MATCHES AND OR EXISTS CACHE STRING BOOL PROGRAM NAMES INTERNAL PATHS DOC PATH NOT NAME NAME_WE FALSE TRUE ON OFF
++" \ contained
++syn region cmakeString start=/"/ end=/"/ skip=/\\"/
++ \ contains=cmakeVariableValue,cmakeRegistry keepend oneline
++syn region cmakeArguments start=/\s*(/ end=/)/
++ \ contains=cmakeEnvironment,cmakeRegistry,cmakeVariableValue,cmakeString,cmakeArgument,cmakeOperators keepend
++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_TEST AUX_SOURCE_DIRECTORY BUILD_COMMAND CMAKE_MINIMUM_REQUIRED CONFIGURE_FILE CREATE_TEST_SOURCELIST ENABLE_TESTING FOREACH ENDFOREACH IF ELSE ENDIF EXPORT_LIBRARY_DEPENDENCIES FIND_FILE FIND_LIBRARY FIND_PACKAGE FIND_PATH FIND_PROGRAM FLTK_WRAP_UI GET_CMAKE_PROPERTY GET_FILENAME_COMPONENT GET_SOURCE_FILE_PROPERTY GET_TARGET_PROPERTY INCLUDE INCLUDE_DIRECTORIES INCLUDE_EXTERNAL_MSPROJECT INCLUDE_REGULAR_EXPRESSION INSTALL_FILES INSTALL_PROGRAMS INSTALL_TARGETS ITK_WRAP_TCL LINK_DIRECTORIES LINK_LIBRARIES LOAD_CACHE LOAD_COMMAND MACRO ENDMACRO MAKE_DIRECTORY MARK_AS_ADVANCED MESSAGE OPTION OUTPUT_REQUIRED_FILES PROJECT QT_WRAP_CPP QT_WRAP_UI SEPARATE_ARGUMENTS REMOVE SET SET_SOURCE_FILES_PROPERTIES SET_TARGET_PROPERTIES SITE_NAME SOURCE_GROUP STRING SUBDIRS SUBDIR_DEPENDS TARGET_LINK_LIBRARIES TRY_COMPILE TRY_RUN USE_MANGLED_MESA UTILITY_SOURCE VARIABLE_REQUIRES WRITE_FILE
++ \ nextgroup=cmakeArgumnts
++
++syn match cmakeMacro /[A-Z_]+/ nextgroup=cmakeArgumnts
++
++" Define the default highlighting.
++" For version 5.7 and earlier: only when not done already
++" For version 5.8 and later: only when an item doesn't have highlighting yet
++if version >= 508 || !exists("did_cmake_syntax_inits")
++ if version < 508
++ let did_cmake_syntax_inits = 1
++ command -nargs=+ HiLink hi link <args>
++ else
++ command -nargs=+ HiLink hi def link <args>
++ endif
++
++
++ HiLink cmakeStatement Statement
++ HiLink cmakeComment Comment
++ HiLink cmakeString String
++ HiLink cmakeVariableValue Type
++ HiLink cmakeRegistry Underlined
++ HiLink cmakeArguments Identifier
++ HiLink cmakeArgument Constant
++ HiLink cmakeEnvironment Special
++ HiLink cmakeOperators Operator
++ HiLink cmakeMacro PreProc
++
++ delcommand HiLink
++endif
++
++let b:current_syntax = "cmake"
++
++"EOF"
More information about the pkg-vim-maintainers
mailing list