swiftgyb.vim 822 B

12345678910111213141516171819202122232425
  1. " This source file is part of the Swift.org open source project
  2. "
  3. " Copyright (c) 2014 - 2020 Apple Inc. and the Swift project authors
  4. " Licensed under Apache License v2.0 with Runtime Library Exception
  5. "
  6. " See https://swift.org/LICENSE.txt for license information
  7. " See https://swift.org/CONTRIBUTORS.txt for the list of Swift project authors
  8. "
  9. " Vim syntax file
  10. " Language: gyb on swift
  11. "
  12. " Vim maintainer: Emir SARI <bitigchi@me.com>
  13. runtime! syntax/swift.vim
  14. unlet b:current_syntax
  15. syn include @Python syntax/python.vim
  16. syn region pythonCode matchgroup=gybPythonCode start=+^ *%+ end=+$+ contains=@Python keepend
  17. syn region pythonCode matchgroup=gybPythonCode start=+%{+ end=+}%+ contains=@Python keepend
  18. syn match gybPythonCode /\${[^}]*}/
  19. hi def link gybPythonCode CursorLineNr
  20. let b:current_syntax = "swiftgyb"