Remove g:vimwiki_debug, which probably nobody used
This commit is contained in:
parent
c565b38bb6
commit
2a70e1517e
@ -141,18 +141,12 @@ endfunction " }}}
|
||||
|
||||
" vimwiki#base#cache_buffer_state
|
||||
function! vimwiki#base#cache_buffer_state() "{{{
|
||||
if !exists('g:vimwiki_current_idx') && g:vimwiki_debug
|
||||
echo "[Vimwiki Internal Error]: Missing global state variable: 'g:vimwiki_current_idx'"
|
||||
endif
|
||||
let b:vimwiki_idx = g:vimwiki_current_idx
|
||||
endfunction "}}}
|
||||
|
||||
" vimwiki#base#recall_buffer_state
|
||||
function! vimwiki#base#recall_buffer_state() "{{{
|
||||
if !exists('b:vimwiki_idx')
|
||||
if g:vimwiki_debug
|
||||
echo "[Vimwiki Internal Error]: Missing buffer state variable: 'b:vimwiki_idx'"
|
||||
endif
|
||||
return 0
|
||||
else
|
||||
let g:vimwiki_current_idx = b:vimwiki_idx
|
||||
@ -404,10 +398,6 @@ endfunction "}}}
|
||||
function! vimwiki#base#open_link(cmd, link, ...) "{{{
|
||||
let link_infos = vimwiki#base#resolve_link(a:link)
|
||||
|
||||
if g:vimwiki_debug
|
||||
echom 'open_link:' string(link_infos)
|
||||
endif
|
||||
|
||||
if link_infos.filename == ''
|
||||
echom 'Vimwiki Error: Unable to resolve link!'
|
||||
return
|
||||
@ -1310,10 +1300,6 @@ function! vimwiki#base#goto_index(wnum, ...) "{{{
|
||||
let cmd = 'edit'
|
||||
endif
|
||||
|
||||
if g:vimwiki_debug == 3
|
||||
echom "--- Goto_index g:curr_idx=".g:vimwiki_current_idx." ww_idx=".idx.""
|
||||
endif
|
||||
|
||||
call Validate_wiki_options(idx)
|
||||
call vimwiki#base#edit_file(cmd,
|
||||
\ VimwikiGet('path', idx).VimwikiGet('index', idx).
|
||||
@ -1909,9 +1895,6 @@ function! s:normalize_link_syntax_n() " {{{
|
||||
\ g:vimwiki_rxWikiLinkMatchUrl, g:vimwiki_rxWikiLinkMatchDescr,
|
||||
\ g:vimwiki_WikiLinkTemplate2)
|
||||
call vimwiki#base#replacestr_at_cursor(g:vimwiki_rxWikiLink, sub)
|
||||
if g:vimwiki_debug > 1
|
||||
echomsg "WikiLink: ".lnk." Sub: ".sub
|
||||
endif
|
||||
return
|
||||
endif
|
||||
|
||||
@ -1919,9 +1902,6 @@ function! s:normalize_link_syntax_n() " {{{
|
||||
let lnk = vimwiki#base#matchstr_at_cursor(g:vimwiki_rxWikiIncl)
|
||||
if !empty(lnk)
|
||||
" NO-OP !!
|
||||
if g:vimwiki_debug > 1
|
||||
echomsg "WikiIncl: ".lnk." Sub: ".lnk
|
||||
endif
|
||||
return
|
||||
endif
|
||||
|
||||
@ -1938,9 +1918,6 @@ function! s:normalize_link_syntax_n() " {{{
|
||||
\ g:vimwiki_WikiLinkTemplate1)
|
||||
endif
|
||||
call vimwiki#base#replacestr_at_cursor('\V'.lnk, sub)
|
||||
if g:vimwiki_debug > 1
|
||||
echomsg "Word: ".lnk." Sub: ".sub
|
||||
endif
|
||||
return
|
||||
endif
|
||||
|
||||
|
@ -396,11 +396,6 @@ function! s:tag_wikiincl(value) "{{{
|
||||
|
||||
let link_infos = vimwiki#base#resolve_link(url_0)
|
||||
|
||||
" TODO: migrate non-essential debugging messages into g:VimwikiLog
|
||||
if g:vimwiki_debug > 1
|
||||
echom string(link_infos)
|
||||
endif
|
||||
|
||||
if link_infos.scheme =~# '\mlocal\|wiki\d\+\|diary'
|
||||
let url = vimwiki#path#relpath(fnamemodify(s:current_html_file, ':h'),
|
||||
\ link_infos.filename)
|
||||
@ -455,12 +450,6 @@ function! s:tag_wikilink(value) "{{{
|
||||
let html_link = link_infos.filename
|
||||
endif
|
||||
|
||||
" generate html output
|
||||
" TODO: migrate non-essential debugging messages into g:VimwikiLog
|
||||
if g:vimwiki_debug > 1
|
||||
echom string(link_infos)
|
||||
endif
|
||||
|
||||
if link_infos.anchor != ''
|
||||
let anchor = substitute(link_infos.anchor, '#', '-', 'g')
|
||||
let html_link .= '#'.anchor
|
||||
@ -1403,10 +1392,6 @@ function! vimwiki#html#Wiki2HTML(path_html, wikifile) "{{{
|
||||
let lsource = readfile(wikifile)
|
||||
let ldest = []
|
||||
|
||||
"if g:vimwiki_debug
|
||||
" echo 'Generating HTML ... '
|
||||
"endif
|
||||
|
||||
call vimwiki#path#mkdir(path_html)
|
||||
|
||||
" nohtml placeholder -- to skip html generation.
|
||||
@ -1526,9 +1511,6 @@ function! vimwiki#html#Wiki2HTML(path_html, wikifile) "{{{
|
||||
" measure the elapsed time
|
||||
let time1 = vimwiki#u#time(starttime) "XXX
|
||||
call VimwikiLog_extend('html',[htmlfile,time1])
|
||||
"if g:vimwiki_debug
|
||||
" echon "\r".htmlfile.' written (time: '.time1.'s)'
|
||||
"endif
|
||||
|
||||
return path_html.htmlfile
|
||||
endfunction "}}}
|
||||
|
@ -133,9 +133,6 @@ function! s:normalize_link_syntax_n() " {{{
|
||||
let lnk = vimwiki#base#matchstr_at_cursor(g:vimwiki_rxWikiIncl)
|
||||
if !empty(lnk)
|
||||
" NO-OP !!
|
||||
if g:vimwiki_debug > 1
|
||||
echomsg "WikiIncl: ".lnk." Sub: ".lnk
|
||||
endif
|
||||
return
|
||||
endif
|
||||
|
||||
@ -146,9 +143,6 @@ function! s:normalize_link_syntax_n() " {{{
|
||||
\ g:vimwiki_rxWikiLinkMatchUrl, g:vimwiki_rxWikiLinkMatchDescr,
|
||||
\ g:vimwiki_WikiLink1Template2)
|
||||
call vimwiki#base#replacestr_at_cursor(g:vimwiki_rxWikiLink0, sub)
|
||||
if g:vimwiki_debug > 1
|
||||
echomsg "WikiLink: ".lnk." Sub: ".sub
|
||||
endif
|
||||
return
|
||||
endif
|
||||
|
||||
@ -159,9 +153,6 @@ function! s:normalize_link_syntax_n() " {{{
|
||||
\ g:vimwiki_rxWikiLinkMatchUrl, g:vimwiki_rxWikiLinkMatchDescr,
|
||||
\ g:vimwiki_WikiLinkTemplate2)
|
||||
call vimwiki#base#replacestr_at_cursor(g:vimwiki_rxWikiLink1, sub)
|
||||
if g:vimwiki_debug > 1
|
||||
echomsg "WikiLink: ".lnk." Sub: ".sub
|
||||
endif
|
||||
return
|
||||
endif
|
||||
|
||||
@ -172,9 +163,6 @@ function! s:normalize_link_syntax_n() " {{{
|
||||
\ g:vimwiki_rxWeblinkMatchUrl, g:vimwiki_rxWeblinkMatchDescr,
|
||||
\ g:vimwiki_Weblink1Template)
|
||||
call vimwiki#base#replacestr_at_cursor(g:vimwiki_rxWeblink, sub)
|
||||
if g:vimwiki_debug > 1
|
||||
echomsg "WebLink: ".lnk." Sub: ".sub
|
||||
endif
|
||||
return
|
||||
endif
|
||||
|
||||
@ -187,9 +175,6 @@ function! s:normalize_link_syntax_n() " {{{
|
||||
\ g:vimwiki_rxWord, '',
|
||||
\ g:vimwiki_WikiLinkTemplate1)
|
||||
call vimwiki#base#replacestr_at_cursor('\V'.lnk, sub)
|
||||
if g:vimwiki_debug > 1
|
||||
echomsg "Word: ".lnk." Sub: ".sub
|
||||
endif
|
||||
return
|
||||
endif
|
||||
|
||||
|
@ -2594,19 +2594,6 @@ Note:
|
||||
Default: 15
|
||||
|
||||
|
||||
------------------------------------------------------------------------------
|
||||
*g:vimwiki_debug*
|
||||
|
||||
Controls verbosity of debugging output, for example, the diagnostic
|
||||
information about HTML conversion.
|
||||
|
||||
Value Description~
|
||||
0 Do not show debug messages.
|
||||
1 Show debug messages.
|
||||
|
||||
Default: 0
|
||||
|
||||
|
||||
------------------------------------------------------------------------------
|
||||
*g:vimwiki_diary_months*
|
||||
|
||||
@ -2718,6 +2705,13 @@ Contributors and their Github usernames in roughly chronological order:
|
||||
==============================================================================
|
||||
15. Changelog *vimwiki-changelog*
|
||||
|
||||
???~
|
||||
|
||||
Removed:~
|
||||
* Removed the option g:vimwiki_debug, which probably nobody used. If you
|
||||
want it back, file an issue at Github.
|
||||
|
||||
|
||||
2.2~
|
||||
|
||||
New:~
|
||||
|
@ -71,16 +71,10 @@ function! s:vimwiki_idx() " {{{
|
||||
endfunction " }}}
|
||||
|
||||
function! s:setup_buffer_leave() "{{{
|
||||
if g:vimwiki_debug == 3
|
||||
echom "Setup_buffer_leave g:curr_idx=".g:vimwiki_current_idx." b:curr_idx=".s:vimwiki_idx().""
|
||||
endif
|
||||
if &filetype ==? 'vimwiki'
|
||||
" cache global vars of current state XXX: SLOW!?
|
||||
call vimwiki#base#cache_buffer_state()
|
||||
endif
|
||||
if g:vimwiki_debug == 3
|
||||
echom " Setup_buffer_leave g:curr_idx=".g:vimwiki_current_idx." b:curr_idx=".s:vimwiki_idx().""
|
||||
endif
|
||||
|
||||
let &autowriteall = s:vimwiki_autowriteall
|
||||
|
||||
@ -91,16 +85,10 @@ function! s:setup_buffer_leave() "{{{
|
||||
endfunction "}}}
|
||||
|
||||
function! s:setup_filetype() "{{{
|
||||
if g:vimwiki_debug == 3
|
||||
echom "Setup_filetype g:curr_idx=".g:vimwiki_current_idx." b:curr_idx=".s:vimwiki_idx().""
|
||||
endif
|
||||
let time0 = reltime() " start the clock "XXX
|
||||
" Find what wiki current buffer belongs to.
|
||||
let path = expand('%:p:h')
|
||||
let idx = vimwiki#base#find_wiki(path)
|
||||
if g:vimwiki_debug == 3
|
||||
echom " Setup_filetype g:curr_idx=".g:vimwiki_current_idx." find_idx=".idx." b:curr_idx=".s:vimwiki_idx().""
|
||||
endif
|
||||
|
||||
if idx == -1 && g:vimwiki_global_ext == 0
|
||||
return
|
||||
@ -124,23 +112,14 @@ function! s:setup_filetype() "{{{
|
||||
endif
|
||||
" initialize and cache global vars of current state
|
||||
call vimwiki#base#setup_buffer_state(idx)
|
||||
if g:vimwiki_debug ==3
|
||||
echom " Setup_filetype g:curr_idx=".g:vimwiki_current_idx." (reset_wiki_state) b:curr_idx=".s:vimwiki_idx().""
|
||||
endif
|
||||
|
||||
unlet! b:vimwiki_fs_rescan
|
||||
set filetype=vimwiki
|
||||
if g:vimwiki_debug ==3
|
||||
echom " Setup_filetype g:curr_idx=".g:vimwiki_current_idx." (set ft=vimwiki) b:curr_idx=".s:vimwiki_idx().""
|
||||
endif
|
||||
let time1 = vimwiki#u#time(time0) "XXX
|
||||
call VimwikiLog_extend('timing',['plugin:setup_filetype:time1',time1])
|
||||
endfunction "}}}
|
||||
|
||||
function! s:setup_buffer_enter() "{{{
|
||||
if g:vimwiki_debug ==3
|
||||
echom "Setup_buffer_enter g:curr_idx=".g:vimwiki_current_idx." b:curr_idx=".s:vimwiki_idx().""
|
||||
endif
|
||||
let time0 = reltime() " start the clock "XXX
|
||||
if !vimwiki#base#recall_buffer_state()
|
||||
" Find what wiki current buffer belongs to.
|
||||
@ -150,9 +129,6 @@ function! s:setup_buffer_enter() "{{{
|
||||
let path = expand('%:p:h')
|
||||
let idx = vimwiki#base#find_wiki(path)
|
||||
|
||||
if g:vimwiki_debug ==3
|
||||
echom " Setup_buffer_enter g:curr_idx=".g:vimwiki_current_idx." find_idx=".idx." b:curr_idx=".s:vimwiki_idx().""
|
||||
endif
|
||||
" The buffer's file is not in the path and user *does NOT* want his wiki
|
||||
" extension to be global -- Do not add new wiki.
|
||||
if idx == -1 && g:vimwiki_global_ext == 0
|
||||
@ -176,9 +152,6 @@ function! s:setup_buffer_enter() "{{{
|
||||
endif
|
||||
" initialize and cache global vars of current state
|
||||
call vimwiki#base#setup_buffer_state(idx)
|
||||
if g:vimwiki_debug ==3
|
||||
echom " Setup_buffer_enter g:curr_idx=".g:vimwiki_current_idx." (reset_wiki_state) b:curr_idx=".s:vimwiki_idx().""
|
||||
endif
|
||||
|
||||
endif
|
||||
|
||||
@ -188,18 +161,12 @@ function! s:setup_buffer_enter() "{{{
|
||||
" au GUIEnter * nested VimwikiIndex
|
||||
if &filetype == ''
|
||||
set filetype=vimwiki
|
||||
if g:vimwiki_debug ==3
|
||||
echom " Setup_buffer_enter g:curr_idx=".g:vimwiki_current_idx." (set ft vimwiki) b:curr_idx=".s:vimwiki_idx().""
|
||||
endif
|
||||
elseif &syntax ==? 'vimwiki'
|
||||
" to force a rescan of the filesystem which may have changed
|
||||
" and update VimwikiLinks syntax group that depends on it;
|
||||
" b:vimwiki_fs_rescan indicates that setup_filetype() has not been run
|
||||
if exists("b:vimwiki_fs_rescan") && VimwikiGet('maxhi')
|
||||
set syntax=vimwiki
|
||||
if g:vimwiki_debug ==3
|
||||
echom " Setup_buffer_enter g:curr_idx=".g:vimwiki_current_idx." (set syntax=vimwiki) b:curr_idx=".s:vimwiki_idx().""
|
||||
endif
|
||||
endif
|
||||
let b:vimwiki_fs_rescan = 1
|
||||
endif
|
||||
@ -238,16 +205,10 @@ function! s:setup_buffer_enter() "{{{
|
||||
endfunction "}}}
|
||||
|
||||
function! s:setup_buffer_reenter() "{{{
|
||||
if g:vimwiki_debug ==3
|
||||
echom "Setup_buffer_reenter g:curr_idx=".g:vimwiki_current_idx." b:curr_idx=".s:vimwiki_idx().""
|
||||
endif
|
||||
if !vimwiki#base#recall_buffer_state()
|
||||
" Do not repeat work of s:setup_buffer_enter() and s:setup_filetype()
|
||||
" Once should be enough ...
|
||||
endif
|
||||
if g:vimwiki_debug ==3
|
||||
echom " Setup_buffer_reenter g:curr_idx=".g:vimwiki_current_idx." b:curr_idx=".s:vimwiki_idx().""
|
||||
endif
|
||||
if !exists("s:vimwiki_autowriteall")
|
||||
let s:vimwiki_autowriteall = &autowriteall
|
||||
endif
|
||||
@ -444,7 +405,6 @@ call s:default('html_header_numbering', 0)
|
||||
call s:default('html_header_numbering_sym', '')
|
||||
call s:default('conceallevel', 2)
|
||||
call s:default('url_maxsave', 15)
|
||||
call s:default('debug', 0)
|
||||
|
||||
call s:default('diary_months',
|
||||
\ {
|
||||
|
@ -177,9 +177,6 @@ let g:vimwiki_rxAnyLink = g:vimwiki_rxWikiLink.'\|'.
|
||||
|
||||
" LINKS: highlighting is complicated due to "nonexistent" links feature {{{
|
||||
function! s:add_target_syntax_ON(target, type) " {{{
|
||||
if g:vimwiki_debug > 1
|
||||
echom '[vimwiki_debug] syntax target > '.a:target
|
||||
endif
|
||||
let prefix0 = 'syntax match '.a:type.' `'
|
||||
let suffix0 = '` display contains=@NoSpell,VimwikiLinkRest,'.a:type.'Char'
|
||||
let prefix1 = 'syntax match '.a:type.'T `'
|
||||
@ -189,9 +186,6 @@ function! s:add_target_syntax_ON(target, type) " {{{
|
||||
endfunction "}}}
|
||||
|
||||
function! s:add_target_syntax_OFF(target) " {{{
|
||||
if g:vimwiki_debug > 1
|
||||
echom '[vimwiki_debug] syntax target > '.a:target
|
||||
endif
|
||||
let prefix0 = 'syntax match VimwikiNoExistsLink `'
|
||||
let suffix0 = '` display contains=@NoSpell,VimwikiLinkRest,VimwikiLinkChar'
|
||||
let prefix1 = 'syntax match VimwikiNoExistsLinkT `'
|
||||
@ -344,14 +338,6 @@ execute 'syn match VimwikiSubScript contained /'.g:vimwiki_char_subscript.'/'.s:
|
||||
" }}}
|
||||
|
||||
" concealed link parts " {{{
|
||||
if g:vimwiki_debug > 1
|
||||
echom 'WikiLink Prefix: '.s:rx_wikilink_prefix
|
||||
echom 'WikiLink Suffix: '.s:rx_wikilink_suffix
|
||||
echom 'WikiLink Prefix1: '.s:rx_wikilink_prefix1
|
||||
echom 'WikiLink Suffix1: '.s:rx_wikilink_suffix1
|
||||
echom 'WikiIncl Prefix: '.g:vimwiki_rxWikiInclPrefix1
|
||||
echom 'WikiIncl Suffix: '.g:vimwiki_rxWikiInclSuffix1
|
||||
endif
|
||||
|
||||
" define the conceal attribute for links only if Vim is new enough to handle it
|
||||
" and the user has g:vimwiki_url_maxsave > 0
|
||||
|
@ -204,9 +204,6 @@ let g:vimwiki_rxMkdRefMatchUrl = '\['.g:vimwiki_rxWikiLinkDescr.']:\%(\s\+\|\n\)
|
||||
|
||||
" LINKS: highlighting is complicated due to "nonexistent" links feature {{{
|
||||
function! s:add_target_syntax_ON(target, type) " {{{
|
||||
if g:vimwiki_debug > 1
|
||||
echom '[vimwiki_debug] syntax target > '.a:target
|
||||
endif
|
||||
let prefix0 = 'syntax match '.a:type.' `'
|
||||
let suffix0 = '` display contains=@NoSpell,VimwikiLinkRest,'.a:type.'Char'
|
||||
let prefix1 = 'syntax match '.a:type.'T `'
|
||||
@ -216,9 +213,6 @@ function! s:add_target_syntax_ON(target, type) " {{{
|
||||
endfunction "}}}
|
||||
|
||||
function! s:add_target_syntax_OFF(target, type) " {{{
|
||||
if g:vimwiki_debug > 1
|
||||
echom '[vimwiki_debug] syntax target > '.a:target
|
||||
endif
|
||||
let prefix0 = 'syntax match VimwikiNoExistsLink `'
|
||||
let suffix0 = '` display contains=@NoSpell,VimwikiLinkRest,'.a:type.'Char'
|
||||
let prefix1 = 'syntax match VimwikiNoExistsLinkT `'
|
||||
@ -340,13 +334,6 @@ endif
|
||||
|
||||
syntax spell toplevel
|
||||
|
||||
if g:vimwiki_debug > 1
|
||||
echom 'WikiLink1 Prefix: '.g:vimwiki_rxWikiLink1Prefix1
|
||||
echom 'WikiLink1 Suffix: '.g:vimwiki_rxWikiLink1Suffix1
|
||||
echom 'Weblink1 Prefix: '.g:vimwiki_rxWeblink1Prefix1
|
||||
echom 'Weblink1 Suffix: '.g:vimwiki_rxWeblink1Suffix1
|
||||
endif
|
||||
|
||||
" VimwikiWikiLink1Char is for syntax markers (and also URL when a description
|
||||
" is present) and may be concealed
|
||||
let s:options = ' contained transparent contains=NONE'
|
||||
|
Loading…
Reference in New Issue
Block a user