Formatting

This commit is contained in:
EinfachToll 2018-02-10 22:04:37 +01:00
parent 68ad4675a3
commit 967b342b23
2 changed files with 14 additions and 8 deletions

View File

@ -83,6 +83,9 @@ function! s:setup_buffer_enter() "{{{
return
endif
" 'autowriteall' is a global Vim option, so in order to change it only for
" Vimwiki buffers, we need to set it here (when the cursor enters the buffer)
" and reset it when the cursor leaves the buffer
let s:vimwiki_autowriteall_saved = &autowriteall
let &autowriteall = vimwiki#vars#get_global('autowriteall')
@ -166,7 +169,7 @@ endfunction " }}}
" Initialization of Vimwiki starts here. Make sure everything below does not
" cause autoload/base to be loaded
" cause autoload/vimwiki/base.vim to be loaded
call vimwiki#vars#init()

View File

@ -3,7 +3,7 @@
" Home: https://github.com/vimwiki/vimwiki/
" Quit if syntax file is already loaded
if version < 600
if v:version < 600
syntax clear
elseif exists("b:current_syntax")
finish
@ -132,10 +132,12 @@ call s:add_target_syntax_ON(s:target, 'VimwikiLink')
" Header levels, 1-6
for s:i in range(1,6)
execute 'syntax match VimwikiHeader'.s:i.' /'.vimwiki#vars#get_syntaxlocal('rxH'.s:i, s:current_syntax).'/ contains=VimwikiTodo,VimwikiHeaderChar,VimwikiNoExistsLink,VimwikiCode,VimwikiLink,@Spell'
execute 'syntax region VimwikiH'.s:i.'Folding start=/'.vimwiki#vars#get_syntaxlocal('rxH'.s:i.'_Start', s:current_syntax).
\ '/ end=/'.vimwiki#vars#get_syntaxlocal('rxH'.s:i.'_End', s:current_syntax).'/me=s-1 transparent fold'
execute 'syntax match VimwikiHeader'.s:i
\ . ' /'.vimwiki#vars#get_syntaxlocal('rxH'.s:i, s:current_syntax).'/'
\ . ' contains=VimwikiTodo,VimwikiHeaderChar,VimwikiNoExistsLink,VimwikiCode,VimwikiLink,@Spell'
execute 'syntax region VimwikiH'.s:i.'Folding'
\ . ' start=/'.vimwiki#vars#get_syntaxlocal('rxH'.s:i.'_Start', s:current_syntax).'/'
\ . ' end=/'.vimwiki#vars#get_syntaxlocal('rxH'.s:i.'_End', s:current_syntax).'/me=s-1 transparent fold'
endfor
@ -233,8 +235,9 @@ execute 'syntax match VimwikiList /'.vimwiki#vars#get_syntaxlocal('rxListDefine'
execute 'syntax match VimwikiListTodo /'.vimwiki#vars#get_syntaxlocal('rxListItem').'/'
if vimwiki#vars#get_global('hl_cb_checked') == 1
execute 'syntax match VimwikiCheckBoxDone /'.vimwiki#vars#get_syntaxlocal('rxListItemWithoutCB').'\s*\['.vimwiki#vars#get_syntaxlocal('listsyms_list')[4].'\]\s.*$/ '.
\ 'contains=VimwikiNoExistsLink,VimwikiLink,@Spell'
execute 'syntax match VimwikiCheckBoxDone '
\ . ' /'.vimwiki#vars#get_syntaxlocal('rxListItemWithoutCB').'\s*\['.vimwiki#vars#get_syntaxlocal('listsyms_list')[4].'\]\s.*$/'
\ . ' contains=VimwikiNoExistsLink,VimwikiLink,@Spell'
elseif vimwiki#vars#get_global('hl_cb_checked') == 2
execute 'syntax match VimwikiCheckBoxDone /'.vimwiki#vars#get_syntaxlocal('rxListItemAndChildren').'/ contains=VimwikiNoExistsLink,VimwikiLink,@Spell'
endif