Revert "Allow list symbols to be configured per wiki"

This reverts commit 79c295a92f.
This commit is contained in:
EinfachToll 2019-01-17 21:57:40 +01:00
parent 05de247f36
commit 35d1f23b92

View File

@ -205,8 +205,6 @@ function! s:populate_wikilocal_options()
\ 'template_ext': '.tpl', \ 'template_ext': '.tpl',
\ 'template_path': $HOME . '/vimwiki/templates/', \ 'template_path': $HOME . '/vimwiki/templates/',
\ 'bullet_types': [], \ 'bullet_types': [],
\ 'listsyms': vimwiki#vars#get_global("listsyms"),
\ 'listsym_rejected': vimwiki#vars#get_global("listsym_rejected"),
\ } \ }
let g:vimwiki_wikilocal_vars = [] let g:vimwiki_wikilocal_vars = []
@ -458,12 +456,14 @@ function! vimwiki#vars#populate_list_vars(wiki)
endif endif
"the user can set the listsyms as string, but vimwiki needs a list "the user can set the listsyms as string, but vimwiki needs a list
let a:wiki.listsyms_list = split(a:wiki.listsyms, '\zs') " TODO make a true wikilocal and use global only as fallback for compatibility
let a:wiki.listsyms_list =
if match(a:wiki.listsyms, a:wiki.listsym_rejected) != -1 \ split(vimwiki#vars#get_global('listsyms'), '\zs')
echomsg 'Vimwiki Warning: the value of listsym_rejected (''' if match(vimwiki#vars#get_global('listsyms'), vimwiki#vars#get_global('listsym_rejected')) != -1
\ . a:wiki.listsym_rejected . ''') must not be a part of listsyms (''' echomsg 'Vimwiki Warning: the value of g:vimwiki_listsym_rejected ('''
\ . a:wiki.listsyms . ''')' \ . vimwiki#vars#get_global('listsym_rejected')
\ . ''') must not be a part of g:vimwiki_listsyms (''' .
\ . vimwiki#vars#get_global('listsyms') . ''')'
endif endif
let a:wiki.rxListItemWithoutCB = let a:wiki.rxListItemWithoutCB =
@ -471,20 +471,20 @@ function! vimwiki#vars#populate_list_vars(wiki)
\ .rxListNumber.'\)\)\s' \ .rxListNumber.'\)\)\s'
let a:wiki.rxListItem = let a:wiki.rxListItem =
\ a:wiki.rxListItemWithoutCB \ a:wiki.rxListItemWithoutCB
\ . '\+\%(\[\(['.a:wiki.listsyms \ . '\+\%(\[\(['.vimwiki#vars#get_global('listsyms')
\ . a:wiki.listsym_rejected.']\)\]\s\)\?' \ . vimwiki#vars#get_global('listsym_rejected').']\)\]\s\)\?'
if recurring_bullets if recurring_bullets
let a:wiki.rxListItemAndChildren = let a:wiki.rxListItemAndChildren =
\ '^\('.rxListBullet.'\)\s\+\[[' \ '^\('.rxListBullet.'\)\s\+\[['
\ . a:wiki.listsyms_list[-1] \ . a:wiki.listsyms_list[-1]
\ . a:wiki.listsym_rejected . ']\]\s.*\%(\n\%(\1\%(' \ . vimwiki#vars#get_global('listsym_rejected') . ']\]\s.*\%(\n\%(\1\%('
\ .rxListBullet.'\).*\|^$\|\s.*\)\)*' \ .rxListBullet.'\).*\|^$\|\s.*\)\)*'
else else
let a:wiki.rxListItemAndChildren = let a:wiki.rxListItemAndChildren =
\ '^\(\s*\)\%('.rxListBullet.'\|' \ '^\(\s*\)\%('.rxListBullet.'\|'
\ . rxListNumber.'\)\s\+\[[' \ . rxListNumber.'\)\s\+\[['
\ . a:wiki.listsyms_list[-1] \ . a:wiki.listsyms_list[-1]
\ . a:wiki.listsym_rejected . ']\]\s.*\%(\n\%(\1\s.*\|^$\)\)*' \ . vimwiki#vars#get_global('listsym_rejected') . ']\]\s.*\%(\n\%(\1\s.*\|^$\)\)*'
endif endif
endfunction endfunction