Browse Source

vim:uboot: add support for cpp comments

Signed-off-by: Alejandro Mery <amery@geeks.cl>
master
Alejandro Mery 10 years ago
parent
commit
3975c1644d
1 changed files with 17 additions and 2 deletions
  1. +17
    -2
      files/.vim/syntax/uboot.vim

+ 17
- 2
files/.vim/syntax/uboot.vim

@ -3,13 +3,28 @@ if exists("b:current_syntax")
finish
endif
if !exists("u_boot_highlight_cpp")
let u_boot_highlight_cpp = 1
endif
" case sensitive
syn case match
syn match scrComment "^[ \t]*#.*$"
syn match scrProperty "\${[a-z\.]\+}"
hi link scrComment Comment
if u_boot_highlight_cpp != 0
syn match cppHash "^[ \t]*#.*$"
syn match cppLineComment "\/\/.*"
syn region cppComment start="/\*" end="\*/"
hi link cppHash PreProc
hi link cppLineComment Comment
hi link cppComment Comment
else
syn match scrComment "^[ \t]*#.*$"
hi link scrComment Comment
endif
hi link scrProperty Identifier
let b:current_syntax = "uboot"

Loading…
Cancel
Save