misc: trigger for extern code blocks of Java, C++ and C are more tolerant
authorAlexis Laferrière <alexis.laf@xymus.net>
Wed, 3 Dec 2014 23:57:34 +0000 (18:57 -0500)
committerAlexis Laferrière <alexis.laf@xymus.net>
Wed, 10 Dec 2014 00:37:42 +0000 (19:37 -0500)
Signed-off-by: Alexis Laferrière <alexis.laf@xymus.net>

misc/vim/syntax/nit.vim

index 0b1f1eb..18a579a 100644 (file)
@@ -131,19 +131,19 @@ hi def link NITFFIDelimiters              Keyword
 " FFI Python
 syntax include @FFIPython syntax/python.vim
 unlet b:current_syntax
-syn match NITFFILanguage       '"Python"' nextgroup=NITFFIBlockPython skipwhite
+syn match NITFFILanguage       /\c"Python"/ nextgroup=NITFFIBlockPython skipwhite
 syn region NITFFIBlockPython matchgroup=NITFFI start='`{' matchgroup=NITFFI end='`}' keepend fold contains=@FFIPython
 
 " FFI Java
 syntax include @FFIJava syntax/java.vim
 unlet b:current_syntax
-syn match NITFFILanguage       '"Java"' nextgroup=NITFFIBlockJava skipwhite
+syn match NITFFILanguage       /\c"Java\(\| inner\)"/ nextgroup=NITFFIBlockJava skipwhite
 syn region NITFFIBlockJava matchgroup=NITFFI start='`{' matchgroup=NITFFI end='`}' keepend fold contains=@FFIJava
 
 " FFI C++
 syntax include @FFICpp syntax/cpp.vim
 unlet b:current_syntax
-syn match NITFFILanguage       '"C++"' nextgroup=NITFFIBlockCpp skipwhite
+syn match NITFFILanguage       /\c"C++\(\| header\| body\)"/ nextgroup=NITFFIBlockCpp skipwhite
 syn region NITFFIBlockCpp matchgroup=NITFFI start='`{' matchgroup=NITFFI end='`}' keepend fold contains=@FFICpp
 
 " FFI Objective-C
@@ -155,7 +155,7 @@ syn region NITFFIBlockObjC matchgroup=NITFFI start='`{' matchgroup=NITFFI end='`
 " FFI C (the last one is the default)
 syntax include @FFIC syntax/c.vim
 unlet b:current_syntax
-syn match NITFFILanguage               '"C\(\| header\| body\)"'       nextgroup=NITFFIBlockC skipwhite
+syn match NITFFILanguage               /\c"C\(\| header\| body\)"/     nextgroup=NITFFIBlockC skipwhite
 syn region NITFFIBlockC matchgroup=NITFFI start='`{' matchgroup=NITFFI end='`}' keepend fold contains=@FFIC
 
 hi def link NITFFILanguage             Define