summaryrefslogtreecommitdiffstats
path: root/ftplugin/plantuml.vim
diff options
context:
space:
mode:
Diffstat (limited to 'ftplugin/plantuml.vim')
-rw-r--r--ftplugin/plantuml.vim19
1 files changed, 14 insertions, 5 deletions
diff --git a/ftplugin/plantuml.vim b/ftplugin/plantuml.vim
index 9fe82d5e..535fd0b9 100644
--- a/ftplugin/plantuml.vim
+++ b/ftplugin/plantuml.vim
@@ -2,12 +2,18 @@ if exists('g:polyglot_disabled') && index(g:polyglot_disabled, 'plantuml') != -1
finish
endif
+scriptencoding utf-8
+" Vim filetype plugin file
+" Language: PlantUML
+" Maintainer: Anders Thøgersen <first name at bladre dot dk>
+" License: VIM LICENSE
+
if exists('b:loaded_plantuml_plugin')
finish
endif
let b:loaded_plantuml_plugin = 1
-let s:cpo_save = &cpo
-set cpo&vim
+let s:cpo_save = &cpoptions
+set cpoptions&vim
if !exists('g:plantuml_executable_script')
let g:plantuml_executable_script='plantuml'
@@ -21,10 +27,13 @@ if exists('loaded_matchit')
\ ',\<rnote\>:\<endrnote\>' .
\ ',\<hnote\>:\<endhnote\>' .
\ ',\<title\>:\<endtitle\>' .
- \ ',\<\while\>:\<endwhile\>'
+ \ ',\<\while\>:\<endwhile\>' .
+ \ ',@startuml:@enduml'
endif
-let &l:makeprg=g:plantuml_executable_script . ' ' . fnameescape(expand('%'))
+if get(g:, 'plantuml_set_makeprg', 1)
+ let &l:makeprg=g:plantuml_executable_script . ' %'
+endif
setlocal comments=s1:/',mb:',ex:'/,:' commentstring=/'%s'/ formatoptions-=t formatoptions+=croql
@@ -33,5 +42,5 @@ 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'
-let &cpo = s:cpo_save
+let &cpoptions = s:cpo_save
unlet s:cpo_save