2016-05-02 04:50:59 -04:00
|
|
|
if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'plantuml') == -1
|
|
|
|
|
2017-05-17 05:07:28 -04:00
|
|
|
if exists('b:loaded_plantuml_plugin')
|
2016-09-11 07:24:17 -04:00
|
|
|
finish
|
2016-05-02 04:50:59 -04:00
|
|
|
endif
|
2016-09-11 07:24:17 -04:00
|
|
|
let b:loaded_plantuml_plugin = 1
|
2017-02-02 15:16:29 -05:00
|
|
|
let s:cpo_save = &cpo
|
|
|
|
set cpo&vim
|
2016-05-02 04:50:59 -04:00
|
|
|
|
2017-05-17 05:07:28 -04:00
|
|
|
if !exists('g:plantuml_executable_script')
|
|
|
|
let g:plantuml_executable_script='plantuml'
|
2016-05-02 04:50:59 -04:00
|
|
|
endif
|
|
|
|
|
2017-05-17 05:07:28 -04:00
|
|
|
if exists('loaded_matchit')
|
2016-09-11 07:24:17 -04:00
|
|
|
let b:match_ignorecase = 0
|
|
|
|
let b:match_words =
|
|
|
|
\ '\(\<ref\>\|\<box\>\|\<opt\>\|\<alt\>\|\<group\>\|\<loop\>\|\<note\>\|\<legend\>\):\<else\>:\<end\>' .
|
|
|
|
\ ',\<if\>:\<elseif\>:\<else\>:\<endif\>' .
|
|
|
|
\ ',\<rnote\>:\<endrnote\>' .
|
|
|
|
\ ',\<hnote\>:\<endhnote\>' .
|
|
|
|
\ ',\<title\>:\<endtitle\>' .
|
|
|
|
\ ',\<\while\>:\<endwhile\>'
|
|
|
|
endif
|
|
|
|
|
2017-05-17 05:07:28 -04:00
|
|
|
let &l:makeprg=g:plantuml_executable_script . ' ' . fnameescape(expand('%'))
|
2016-05-02 04:50:59 -04:00
|
|
|
|
|
|
|
setlocal comments=s1:/',mb:',ex:'/,:' commentstring=/'%s'/ formatoptions-=t formatoptions+=croql
|
|
|
|
|
2016-09-11 07:24:17 -04:00
|
|
|
let b:endwise_addition = '\=index(["note","legend"], submatch(0))!=-1 ? "end " . submatch(0) : "end"'
|
|
|
|
let b:endwise_words = 'loop,group,alt,note,legend'
|
|
|
|
let b:endwise_pattern = '^\s*\zs\<\(loop\|group\|alt\|note\ze[^:]*$\|legend\)\>.*$'
|
|
|
|
let b:endwise_syngroups = 'plantumlKeyword'
|
|
|
|
|
2017-02-02 15:16:29 -05:00
|
|
|
let &cpo = s:cpo_save
|
|
|
|
unlet s:cpo_save
|
|
|
|
|
2016-05-02 04:50:59 -04:00
|
|
|
endif
|