summaryrefslogtreecommitdiffstats
path: root/ftplugin/plantuml.vim
diff options
context:
space:
mode:
authorAdam Stankiewicz <sheerun@sher.pl>2016-09-11 13:24:17 +0200
committerAdam Stankiewicz <sheerun@sher.pl>2016-09-11 13:24:17 +0200
commit0244e228faf6ee71750cbca3bdcd18411a927d22 (patch)
treea72e5c9839ea593f6edc23f7f0e637e0a4a89413 /ftplugin/plantuml.vim
parentab61d2ac8eafc9c10097577736602da48ec568ca (diff)
downloadvim-polyglot-0244e228faf6ee71750cbca3bdcd18411a927d22.tar.gz
vim-polyglot-0244e228faf6ee71750cbca3bdcd18411a927d22.zip
Update
Diffstat (limited to 'ftplugin/plantuml.vim')
-rw-r--r--ftplugin/plantuml.vim26
1 files changed, 21 insertions, 5 deletions
diff --git a/ftplugin/plantuml.vim b/ftplugin/plantuml.vim
index c4deb886..1d15b06f 100644
--- a/ftplugin/plantuml.vim
+++ b/ftplugin/plantuml.vim
@@ -6,17 +6,33 @@ if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'plantuml') == -
" Last Change: 19-Jun-2012
" Version: 0.1
-if exists("g:loaded_plantuml_plugin")
- finish
+if exists("b:loaded_plantuml_plugin")
+ finish
endif
-let g:loaded_plantuml_plugin = 1
+let b:loaded_plantuml_plugin = 1
if !exists("g:plantuml_executable_script")
- let g:plantuml_executable_script="plantuml"
+ let g:plantuml_executable_script="plantuml"
endif
-autocmd Filetype plantuml let &l:makeprg=g:plantuml_executable_script . " " . fnameescape(expand("%"))
+if exists("loaded_matchit")
+ 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
+
+let &l:makeprg=g:plantuml_executable_script . " " . fnameescape(expand("%"))
setlocal comments=s1:/',mb:',ex:'/,:' commentstring=/'%s'/ formatoptions-=t formatoptions+=croql
+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'
+
endif