Merge branch 'dev' of git://github.com/vimwiki/vimwiki into sstallion/autogenerate-tags
This commit is contained in:
commit
0e664a6230
@ -1027,10 +1027,11 @@ function! vimwiki#base#nested_syntax(filetype, start, end, textSnipHl) abort
|
|||||||
let group='texMathZoneGroup'
|
let group='texMathZoneGroup'
|
||||||
endif
|
endif
|
||||||
|
|
||||||
|
let concealpre = vimwiki#vars#get_global('conceal_pre') ? ' concealends' : ''
|
||||||
execute 'syntax region textSnip'.ft.
|
execute 'syntax region textSnip'.ft.
|
||||||
\ ' matchgroup='.a:textSnipHl.
|
\ ' matchgroup='.a:textSnipHl.
|
||||||
\ ' start="'.a:start.'" end="'.a:end.'"'.
|
\ ' start="'.a:start.'" end="'.a:end.'"'.
|
||||||
\ ' contains=@'.group.' keepend'
|
\ ' contains=@'.group.' keepend'.concealpre
|
||||||
|
|
||||||
" A workaround to Issue 115: Nested Perl syntax highlighting differs from
|
" A workaround to Issue 115: Nested Perl syntax highlighting differs from
|
||||||
" regular one.
|
" regular one.
|
||||||
@ -1904,18 +1905,14 @@ function! vimwiki#base#table_of_contents(create)
|
|||||||
for idx in range(h_level, 5) | let headers_levels[idx] = ['', 0] | endfor
|
for idx in range(h_level, 5) | let headers_levels[idx] = ['', 0] | endfor
|
||||||
|
|
||||||
let h_complete_id = ''
|
let h_complete_id = ''
|
||||||
for l in range(h_level-1)
|
if vimwiki#vars#get_global('toc_link_format') == 0
|
||||||
if headers_levels[l][0] != ''
|
for l in range(h_level-1)
|
||||||
let h_complete_id .= headers_levels[l][0].'#'
|
if headers_levels[l][0] != ''
|
||||||
endif
|
let h_complete_id .= headers_levels[l][0].'#'
|
||||||
endfor
|
endif
|
||||||
let h_complete_id .= headers_levels[h_level-1][0]
|
endfor
|
||||||
|
|
||||||
if numbering > 0 && numbering <= h_level
|
|
||||||
let h_number = join(map(copy(headers_levels[numbering-1 : h_level-1]), 'v:val[1]'), '.')
|
|
||||||
let h_number .= vimwiki#vars#get_global('html_header_numbering_sym')
|
|
||||||
let h_text = h_number.' '.h_text
|
|
||||||
endif
|
endif
|
||||||
|
let h_complete_id .= headers_levels[h_level-1][0]
|
||||||
|
|
||||||
call add(complete_header_infos, [h_level, h_complete_id, h_text])
|
call add(complete_header_infos, [h_level, h_complete_id, h_text])
|
||||||
endfor
|
endfor
|
||||||
@ -1927,8 +1924,10 @@ function! vimwiki#base#table_of_contents(create)
|
|||||||
for [lvl, link, desc] in complete_header_infos
|
for [lvl, link, desc] in complete_header_infos
|
||||||
if vimwiki#vars#get_wikilocal('syntax') == 'markdown'
|
if vimwiki#vars#get_wikilocal('syntax') == 'markdown'
|
||||||
let link_tpl = vimwiki#vars#get_syntaxlocal('Weblink2Template')
|
let link_tpl = vimwiki#vars#get_syntaxlocal('Weblink2Template')
|
||||||
else
|
elseif vimwiki#vars#get_global('toc_link_format') == 0
|
||||||
let link_tpl = vimwiki#vars#get_global('WikiLinkTemplate2')
|
let link_tpl = vimwiki#vars#get_global('WikiLinkTemplate2')
|
||||||
|
else
|
||||||
|
let link_tpl = vimwiki#vars#get_global('WikiLinkTemplate1')
|
||||||
endif
|
endif
|
||||||
let link = s:safesubstitute(link_tpl, '__LinkUrl__',
|
let link = s:safesubstitute(link_tpl, '__LinkUrl__',
|
||||||
\ '#'.link, '')
|
\ '#'.link, '')
|
||||||
|
@ -145,6 +145,7 @@ function! s:read_global_settings_from_user()
|
|||||||
\ 'auto_chdir': {'type': type(0), 'default': 0, 'min': 0, 'max': 1},
|
\ 'auto_chdir': {'type': type(0), 'default': 0, 'min': 0, 'max': 1},
|
||||||
\ 'autowriteall': {'type': type(0), 'default': 1, 'min': 0, 'max': 1},
|
\ 'autowriteall': {'type': type(0), 'default': 1, 'min': 0, 'max': 1},
|
||||||
\ 'conceallevel': {'type': type(0), 'default': 2, 'min': 0, 'max': 3},
|
\ 'conceallevel': {'type': type(0), 'default': 2, 'min': 0, 'max': 3},
|
||||||
|
\ 'conceal_pre': {'type': type(0), 'default': 0, 'min': 0, 'max': 1},
|
||||||
\ 'create_link': {'type': type(0), 'default': 1, 'min':0, 'max': 1},
|
\ 'create_link': {'type': type(0), 'default': 1, 'min':0, 'max': 1},
|
||||||
\ 'diary_months': {'type': type({}), 'default':
|
\ 'diary_months': {'type': type({}), 'default':
|
||||||
\ {
|
\ {
|
||||||
@ -180,6 +181,7 @@ function! s:read_global_settings_from_user()
|
|||||||
\ 'tags_header_level': {'type': type(0), 'default': 1, 'min': 1, 'max': 5},
|
\ 'tags_header_level': {'type': type(0), 'default': 1, 'min': 1, 'max': 5},
|
||||||
\ 'toc_header': {'type': type(''), 'default': 'Contents', 'min_length': 1},
|
\ 'toc_header': {'type': type(''), 'default': 'Contents', 'min_length': 1},
|
||||||
\ 'toc_header_level': {'type': type(0), 'default': 1, 'min': 1, 'max': 6},
|
\ 'toc_header_level': {'type': type(0), 'default': 1, 'min': 1, 'max': 6},
|
||||||
|
\ 'toc_link_format': {'type': type(0), 'default': 0, 'min': 0, 'max': 1},
|
||||||
\ 'url_maxsave': {'type': type(0), 'default': 15, 'min': 0},
|
\ 'url_maxsave': {'type': type(0), 'default': 15, 'min': 0},
|
||||||
\ 'use_calendar': {'type': type(0), 'default': 1, 'min': 0, 'max': 1},
|
\ 'use_calendar': {'type': type(0), 'default': 1, 'min': 0, 'max': 1},
|
||||||
\ 'use_mouse': {'type': type(0), 'default': 0, 'min': 0, 'max': 1},
|
\ 'use_mouse': {'type': type(0), 'default': 0, 'min': 0, 'max': 1},
|
||||||
|
@ -878,6 +878,8 @@ is decorated: >
|
|||||||
|
|
||||||
*bold text*
|
*bold text*
|
||||||
_italic text_
|
_italic text_
|
||||||
|
_*bold italic text*_
|
||||||
|
*_bold italic text _*
|
||||||
~~strikeout text~~
|
~~strikeout text~~
|
||||||
`code (no syntax) text`
|
`code (no syntax) text`
|
||||||
super^script^
|
super^script^
|
||||||
@ -2909,6 +2911,26 @@ URLs and hides markers and URL for links that have a description.
|
|||||||
Default: 2
|
Default: 2
|
||||||
|
|
||||||
|
|
||||||
|
------------------------------------------------------------------------------
|
||||||
|
*g:vimwiki_conceal_pre*
|
||||||
|
|
||||||
|
Conceal preformatted text markers. For example,
|
||||||
|
>
|
||||||
|
{{{python
|
||||||
|
def say_hello():
|
||||||
|
print("Hello, world!")
|
||||||
|
}}}
|
||||||
|
>
|
||||||
|
would appear as simply
|
||||||
|
>
|
||||||
|
def say_hello():
|
||||||
|
print("Hello, world!")
|
||||||
|
>
|
||||||
|
in your wiki file.
|
||||||
|
|
||||||
|
Default: 0
|
||||||
|
|
||||||
|
|
||||||
------------------------------------------------------------------------------
|
------------------------------------------------------------------------------
|
||||||
*g:vimwiki_autowriteall*
|
*g:vimwiki_autowriteall*
|
||||||
|
|
||||||
@ -2994,6 +3016,21 @@ are from 1 to 6.
|
|||||||
The default is 1.
|
The default is 1.
|
||||||
|
|
||||||
|
|
||||||
|
------------------------------------------------------------------------------
|
||||||
|
*g:vimwiki_toc_link_format*
|
||||||
|
|
||||||
|
The format of the links in the Table of Contents (see |vimwiki-toc|).
|
||||||
|
|
||||||
|
|
||||||
|
Value Description~
|
||||||
|
0 Extended: The link contains the description and URL. URL
|
||||||
|
references all levels.
|
||||||
|
1 Brief: The link contains only the URL. URL references only
|
||||||
|
the immediate level.
|
||||||
|
|
||||||
|
Default: 0
|
||||||
|
|
||||||
|
|
||||||
------------------------------------------------------------------------------
|
------------------------------------------------------------------------------
|
||||||
*g:vimwiki_map_prefix*
|
*g:vimwiki_map_prefix*
|
||||||
|
|
||||||
|
@ -318,8 +318,9 @@ execute 'syntax match VimwikiCodeT /'.vimwiki#vars#get_syntaxlocal('rxCode').
|
|||||||
" <hr> horizontal rule
|
" <hr> horizontal rule
|
||||||
execute 'syntax match VimwikiHR /'.vimwiki#vars#get_syntaxlocal('rxHR').'/'
|
execute 'syntax match VimwikiHR /'.vimwiki#vars#get_syntaxlocal('rxHR').'/'
|
||||||
|
|
||||||
execute 'syntax region VimwikiPre start=/'.vimwiki#vars#get_syntaxlocal('rxPreStart').
|
let concealpre = vimwiki#vars#get_global('conceal_pre') ? ' concealends' : ''
|
||||||
\ '/ end=/'.vimwiki#vars#get_syntaxlocal('rxPreEnd').'/ contains=@Spell'
|
execute 'syntax region VimwikiPre matchgroup=VimwikiPreDelim start=/'.vimwiki#vars#get_syntaxlocal('rxPreStart').
|
||||||
|
\ '/ end=/'.vimwiki#vars#get_syntaxlocal('rxPreEnd').'/ contains=@Spell'.concealpre
|
||||||
|
|
||||||
execute 'syntax region VimwikiMath start=/'.vimwiki#vars#get_syntaxlocal('rxMathStart').
|
execute 'syntax region VimwikiMath start=/'.vimwiki#vars#get_syntaxlocal('rxMathStart').
|
||||||
\ '/ end=/'.vimwiki#vars#get_syntaxlocal('rxMathEnd').'/ contains=@Spell'
|
\ '/ end=/'.vimwiki#vars#get_syntaxlocal('rxMathEnd').'/ contains=@Spell'
|
||||||
@ -395,6 +396,7 @@ hi def link VimwikiCodeT VimwikiCode
|
|||||||
|
|
||||||
hi def link VimwikiPre PreProc
|
hi def link VimwikiPre PreProc
|
||||||
hi def link VimwikiPreT VimwikiPre
|
hi def link VimwikiPreT VimwikiPre
|
||||||
|
hi def link VimwikiPreDelim VimwikiPre
|
||||||
|
|
||||||
hi def link VimwikiMath Number
|
hi def link VimwikiMath Number
|
||||||
hi def link VimwikiMathT VimwikiMath
|
hi def link VimwikiMathT VimwikiMath
|
||||||
|
Loading…
Reference in New Issue
Block a user