Attempt to autodetect target language (D/C++) in extra/vim/syntax/propane.vim
This commit is contained in:
parent
23834bef82
commit
232af68081
@ -3,6 +3,7 @@
|
||||
### New Features
|
||||
|
||||
- Add `noline` grammar statement to skip emitting `#line` directives
|
||||
- Attempt to autodetect target language (D/C++) in extra/vim/syntax/propane.vim
|
||||
|
||||
### Fixes
|
||||
|
||||
|
||||
@ -8,7 +8,11 @@ if exists("b:current_syntax")
|
||||
endif
|
||||
|
||||
if !exists("b:propane_subtype")
|
||||
if search('\<import\s\+\%(std\|core\)\.', 'nw') > 0
|
||||
let b:propane_subtype = "d"
|
||||
else
|
||||
let b:propane_subtype = "cpp"
|
||||
endif
|
||||
endif
|
||||
|
||||
exe "syn include @propaneTarget syntax/".b:propane_subtype.".vim"
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user