Allow customization of header level of TOC
Instead of forcing the TOC to always be at header level 1, allow the user to specify via the option g:vimwiki_toc_header_level what level they want. This defaults to 1, so if the user does nothing then the old behavior will remain the same.
This commit is contained in:
@ -287,7 +287,7 @@ function! vimwiki#diary#generate_diary_section()
|
||||
if vimwiki#path#is_equal(current_file, diary_file)
|
||||
let content_rx = '^\%(\s*\* \)\|\%(^\s*$\)\|\%('.vimwiki#vars#get_syntaxlocal('rxHeader').'\)'
|
||||
call vimwiki#base#update_listing_in_buffer(s:format_diary(),
|
||||
\ vimwiki#vars#get_wikilocal('diary_header'), content_rx, line('$')+1, 1)
|
||||
\ vimwiki#vars#get_wikilocal('diary_header'), content_rx, line('$')+1, 1, 1)
|
||||
else
|
||||
echomsg 'Vimwiki Error: You can generate diary links only in a diary index page!'
|
||||
endif
|
||||
|
Reference in New Issue
Block a user