From 35d1f23b921d0657c1792fbed3c8a2ca2dac3e9a Mon Sep 17 00:00:00 2001 From: EinfachToll Date: Thu, 17 Jan 2019 21:57:40 +0100 Subject: [PATCH] Revert "Allow list symbols to be configured per wiki" This reverts commit 79c295a92fad820719b6554a63f030f97e0adb9d. --- autoload/vimwiki/vars.vim | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/autoload/vimwiki/vars.vim b/autoload/vimwiki/vars.vim index b4cc433..40d7441 100644 --- a/autoload/vimwiki/vars.vim +++ b/autoload/vimwiki/vars.vim @@ -205,8 +205,6 @@ function! s:populate_wikilocal_options() \ 'template_ext': '.tpl', \ 'template_path': $HOME . '/vimwiki/templates/', \ 'bullet_types': [], - \ 'listsyms': vimwiki#vars#get_global("listsyms"), - \ 'listsym_rejected': vimwiki#vars#get_global("listsym_rejected"), \ } let g:vimwiki_wikilocal_vars = [] @@ -458,12 +456,14 @@ function! vimwiki#vars#populate_list_vars(wiki) endif "the user can set the listsyms as string, but vimwiki needs a list - let a:wiki.listsyms_list = split(a:wiki.listsyms, '\zs') - - if match(a:wiki.listsyms, a:wiki.listsym_rejected) != -1 - echomsg 'Vimwiki Warning: the value of listsym_rejected (''' - \ . a:wiki.listsym_rejected . ''') must not be a part of listsyms (''' - \ . a:wiki.listsyms . ''')' + " TODO make a true wikilocal and use global only as fallback for compatibility + let a:wiki.listsyms_list = + \ split(vimwiki#vars#get_global('listsyms'), '\zs') + if match(vimwiki#vars#get_global('listsyms'), vimwiki#vars#get_global('listsym_rejected')) != -1 + echomsg 'Vimwiki Warning: the value of g:vimwiki_listsym_rejected (''' + \ . vimwiki#vars#get_global('listsym_rejected') + \ . ''') must not be a part of g:vimwiki_listsyms (''' . + \ . vimwiki#vars#get_global('listsyms') . ''')' endif let a:wiki.rxListItemWithoutCB = @@ -471,20 +471,20 @@ function! vimwiki#vars#populate_list_vars(wiki) \ .rxListNumber.'\)\)\s' let a:wiki.rxListItem = \ a:wiki.rxListItemWithoutCB - \ . '\+\%(\[\(['.a:wiki.listsyms - \ . a:wiki.listsym_rejected.']\)\]\s\)\?' + \ . '\+\%(\[\(['.vimwiki#vars#get_global('listsyms') + \ . vimwiki#vars#get_global('listsym_rejected').']\)\]\s\)\?' if recurring_bullets let a:wiki.rxListItemAndChildren = \ '^\('.rxListBullet.'\)\s\+\[[' \ . a:wiki.listsyms_list[-1] - \ . a:wiki.listsym_rejected . ']\]\s.*\%(\n\%(\1\%(' + \ . vimwiki#vars#get_global('listsym_rejected') . ']\]\s.*\%(\n\%(\1\%(' \ .rxListBullet.'\).*\|^$\|\s.*\)\)*' else let a:wiki.rxListItemAndChildren = \ '^\(\s*\)\%('.rxListBullet.'\|' \ . rxListNumber.'\)\s\+\[[' \ . a:wiki.listsyms_list[-1] - \ . a:wiki.listsym_rejected . ']\]\s.*\%(\n\%(\1\s.*\|^$\)\)*' + \ . vimwiki#vars#get_global('listsym_rejected') . ']\]\s.*\%(\n\%(\1\s.*\|^$\)\)*' endif endfunction