Allow the user to disable preprocessor directives.
This adds a new global (`g:gasDisablePreproc`) or per-buffer (`gasDisablePreproc`) option to disable the special highlighting applied to CPP preprocessor directives like `#include`, `#if` etc. fixes #5
This commit is contained in:
parent
0c562e7a52
commit
986cffaffd
|
|
@ -2013,13 +2013,14 @@ call <SID>MapOpcode('gasOpcode_X64_VMX' , 'x64' , 'vmx')
|
|||
call <SID>MapOpcode('gasOpcode_X86_64_Base' , 'x64' , 'base')
|
||||
|
||||
" support CPP preprocessor tags
|
||||
syn case match
|
||||
if !exists('g:gasDisablePreproc') && !exists('b:gasDisablePreproc')
|
||||
syn case match
|
||||
|
||||
syn include @cPP syntax/c.vim
|
||||
syn match cPPLineCont "\\$" contained
|
||||
|
||||
syn region cPPPreProc start=/^\s*#\s*\(if\|else\|endif\|define\|include\)/ end=/$/ contains=@cPP,cPPLineCont
|
||||
syn include @cPP syntax/c.vim
|
||||
syn match cPPLineCont "\\$" contained
|
||||
|
||||
syn region cPPPreProc start=/^\s*#\s*\(if\|else\|endif\|define\|include\)/ end=/$/ contains=@cPP,cPPLineCont
|
||||
endif
|
||||
|
||||
" finishing touches
|
||||
let b:current_syntax = "gas"
|
||||
|
|
|
|||
Loading…
Reference in New Issue