Formatting
This commit is contained in:
parent
68ad4675a3
commit
967b342b23
@ -83,6 +83,9 @@ function! s:setup_buffer_enter() "{{{
|
|||||||
return
|
return
|
||||||
endif
|
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 s:vimwiki_autowriteall_saved = &autowriteall
|
||||||
let &autowriteall = vimwiki#vars#get_global('autowriteall')
|
let &autowriteall = vimwiki#vars#get_global('autowriteall')
|
||||||
|
|
||||||
@ -166,7 +169,7 @@ endfunction " }}}
|
|||||||
|
|
||||||
|
|
||||||
" Initialization of Vimwiki starts here. Make sure everything below does not
|
" 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()
|
call vimwiki#vars#init()
|
||||||
|
|
||||||
|
@ -3,7 +3,7 @@
|
|||||||
" Home: https://github.com/vimwiki/vimwiki/
|
" Home: https://github.com/vimwiki/vimwiki/
|
||||||
|
|
||||||
" Quit if syntax file is already loaded
|
" Quit if syntax file is already loaded
|
||||||
if version < 600
|
if v:version < 600
|
||||||
syntax clear
|
syntax clear
|
||||||
elseif exists("b:current_syntax")
|
elseif exists("b:current_syntax")
|
||||||
finish
|
finish
|
||||||
@ -132,10 +132,12 @@ call s:add_target_syntax_ON(s:target, 'VimwikiLink')
|
|||||||
|
|
||||||
" Header levels, 1-6
|
" Header levels, 1-6
|
||||||
for s:i in range(1,6)
|
for s:i in range(1,6)
|
||||||
|
execute 'syntax match VimwikiHeader'.s:i
|
||||||
execute 'syntax match VimwikiHeader'.s:i.' /'.vimwiki#vars#get_syntaxlocal('rxH'.s:i, s:current_syntax).'/ contains=VimwikiTodo,VimwikiHeaderChar,VimwikiNoExistsLink,VimwikiCode,VimwikiLink,@Spell'
|
\ . ' /'.vimwiki#vars#get_syntaxlocal('rxH'.s:i, s:current_syntax).'/'
|
||||||
execute 'syntax region VimwikiH'.s:i.'Folding start=/'.vimwiki#vars#get_syntaxlocal('rxH'.s:i.'_Start', s:current_syntax).
|
\ . ' contains=VimwikiTodo,VimwikiHeaderChar,VimwikiNoExistsLink,VimwikiCode,VimwikiLink,@Spell'
|
||||||
\ '/ end=/'.vimwiki#vars#get_syntaxlocal('rxH'.s:i.'_End', s:current_syntax).'/me=s-1 transparent fold'
|
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
|
endfor
|
||||||
|
|
||||||
|
|
||||||
@ -233,8 +235,9 @@ execute 'syntax match VimwikiList /'.vimwiki#vars#get_syntaxlocal('rxListDefine'
|
|||||||
execute 'syntax match VimwikiListTodo /'.vimwiki#vars#get_syntaxlocal('rxListItem').'/'
|
execute 'syntax match VimwikiListTodo /'.vimwiki#vars#get_syntaxlocal('rxListItem').'/'
|
||||||
|
|
||||||
if vimwiki#vars#get_global('hl_cb_checked') == 1
|
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.*$/ '.
|
execute 'syntax match VimwikiCheckBoxDone '
|
||||||
\ 'contains=VimwikiNoExistsLink,VimwikiLink,@Spell'
|
\ . ' /'.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
|
elseif vimwiki#vars#get_global('hl_cb_checked') == 2
|
||||||
execute 'syntax match VimwikiCheckBoxDone /'.vimwiki#vars#get_syntaxlocal('rxListItemAndChildren').'/ contains=VimwikiNoExistsLink,VimwikiLink,@Spell'
|
execute 'syntax match VimwikiCheckBoxDone /'.vimwiki#vars#get_syntaxlocal('rxListItemAndChildren').'/ contains=VimwikiNoExistsLink,VimwikiLink,@Spell'
|
||||||
endif
|
endif
|
||||||
|
Loading…
Reference in New Issue
Block a user