Remove option 2 of 'auto_toc'

It doesn't really work for :VimwikiAll2HTML
This commit is contained in:
EinfachToll 2014-08-18 09:35:52 +02:00
parent 502212b58d
commit 2dd9a153bc
3 changed files with 8 additions and 16 deletions

View File

@ -1328,11 +1328,6 @@ endfunction " }}}
function! vimwiki#html#Wiki2HTML(path_html, wikifile) "{{{
if VimwikiGet('auto_toc') >= 1
call vimwiki#base#table_of_contents(0)
noautocmd update
endif
let starttime = reltime() " start the clock
let done = 0

View File

@ -1740,17 +1740,14 @@ This will keep your HTML files up to date.
*vimwiki-option-auto_toc*
------------------------------------------------------------------------------
Set this option to a value greater than 0 to automatically update the Table of
Contents: >
Key Default value Values~
auto_toc 0 0, 1
Description~
Set this option to 1 to automatically generate the table of contents when the
current wiki page is saved: >
let g:vimwiki_list = [{'path': '~/my_site/', 'auto_toc': 1}]
Value Description~
0 Don't update it automatically.
1 Update when the wiki file is converted to HTML.
2 Update when the wiki file is saved.
Default: 0
*vimwiki-option-index*
------------------------------------------------------------------------------

View File

@ -617,7 +617,7 @@ nnoremap <silent><buffer> <Plug>VimwikiRemoveHeaderLevel :
" AUTOCOMMANDS {{{
function! s:toc_html()
if VimwikiGet('auto_toc') >= 2 && VimwikiGet('auto_export') == 0
if VimwikiGet('auto_toc')
call vimwiki#base#table_of_contents(0)
endif
if VimwikiGet('auto_export')
@ -626,7 +626,7 @@ function! s:toc_html()
endif
endfunction
if VimwikiGet('auto_export') || VimwikiGet('auto_toc') >= 2
if VimwikiGet('auto_export') || VimwikiGet('auto_toc')
augroup vimwiki
au BufWritePost <buffer> call s:toc_html()
augroup END