cmake.vim.in 3.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103
  1. " Vim syntax file
  2. " Program: CMake - Cross-Platform Makefile Generator
  3. " Version: @VERSION@
  4. " Language: CMake
  5. " Author: Andy Cedilnik <andy.cedilnik@kitware.com>,
  6. " Nicholas Hutchinson <nshutchinson@gmail.com>,
  7. " Patrick Boettcher <patrick.boettcher@posteo.de>
  8. " Maintainer: Dimitri Merejkowsky <d.merej@gmail.com>
  9. " Former Maintainer: Karthik Krishnan <karthik.krishnan@kitware.com>
  10. " Last Change: @DATE@
  11. "
  12. " Licence: The CMake license applies to this file. See
  13. " https://cmake.org/licensing
  14. " This implies that distribution with Vim is allowed
  15. if exists("b:current_syntax")
  16. finish
  17. endif
  18. let s:keepcpo= &cpo
  19. set cpo&vim
  20. syn region cmakeComment start="#" end="$" contains=cmakeTodo,cmakeLuaComment,@Spell
  21. syn region cmakeLuaComment start="\[\z(=*\)\[" end="\]\z1\]" contains=cmakeTodo,@Spell
  22. syn match cmakeEscaped /\(\\\\\|\\"\|\\n\|\\t\)/ contained
  23. syn region cmakeRegistry start="\[" end="]" contained oneline contains=cmakeTodo,cmakeEscaped
  24. syn region cmakeGeneratorExpression start="$<" end=">" contained oneline contains=cmakeVariableValue,cmakeProperty,cmakeGeneratorExpressions,cmakeTodo
  25. syn region cmakeString start='"' end='"' contained contains=cmakeTodo,cmakeVariableValue,cmakeEscaped
  26. syn region cmakeVariableValue start="${" end="}" contained oneline contains=cmakeVariable,cmakeTodo
  27. syn region cmakeEnvironment start="$ENV{" end="}" contained oneline contains=cmakeTodo
  28. syn region cmakeArguments start="(" end=")" contains=ALLBUT,cmakeCommand,cmakeCommandConditional,cmakeCommandRepeat,cmakeCommandDeprecated,cmakeArguments,cmakeTodo
  29. syn case match
  30. syn keyword cmakeProperty contained
  31. @PROPERTIES@
  32. syn keyword cmakeVariable contained
  33. @VARIABLE_LIST@
  34. syn keyword cmakeModule contained
  35. @MODULES@
  36. @KEYWORDS@
  37. syn keyword cmakeGeneratorExpressions contained
  38. @GENERATOR_EXPRESSIONS@
  39. syn case ignore
  40. syn keyword cmakeCommand
  41. @COMMAND_LIST@
  42. \ nextgroup=cmakeArguments
  43. syn keyword cmakeCommandConditional
  44. @CONDITIONALS@
  45. \ nextgroup=cmakeArguments
  46. syn keyword cmakeCommandRepeat
  47. @LOOPS@
  48. \ nextgroup=cmakeArguments
  49. syn keyword cmakeCommandDeprecated
  50. @DEPRECATED@
  51. \ nextgroup=cmakeArguments
  52. syn case match
  53. syn keyword cmakeTodo
  54. \ TODO FIXME XXX
  55. \ contained
  56. hi def link cmakeCommand Function
  57. hi def link cmakeCommandConditional Conditional
  58. hi def link cmakeCommandDeprecated WarningMsg
  59. hi def link cmakeCommandRepeat Repeat
  60. hi def link cmakeComment Comment
  61. hi def link cmakeEnvironment Special
  62. hi def link cmakeEscaped Special
  63. hi def link cmakeGeneratorExpression WarningMsg
  64. hi def link cmakeGeneratorExpressions Constant
  65. hi def link cmakeLuaComment Comment
  66. hi def link cmakeModule Include
  67. hi def link cmakeProperty Constant
  68. hi def link cmakeRegistry Underlined
  69. hi def link cmakeString String
  70. hi def link cmakeTodo TODO
  71. hi def link cmakeVariableValue Type
  72. hi def link cmakeVariable Identifier
  73. @KEYWORDS_HIGHLIGHT@
  74. let b:current_syntax = "cmake"
  75. let &cpo = s:keepcpo
  76. unlet s:keepcpo
  77. " vim: set nowrap: