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'
|
||||
endif
|
||||
|
||||
let concealpre = vimwiki#vars#get_global('conceal_pre') ? ' concealends' : ''
|
||||
execute 'syntax region textSnip'.ft.
|
||||
\ ' matchgroup='.a:textSnipHl.
|
||||
\ ' start="'.a:start.'" end="'.a:end.'"'.
|
||||
\ ' contains=@'.group.' keepend'
|
||||
\ ' contains=@'.group.' keepend'.concealpre
|
||||
|
||||
" A workaround to Issue 115: Nested Perl syntax highlighting differs from
|
||||
" 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
|
||||
|
||||
let h_complete_id = ''
|
||||
if vimwiki#vars#get_global('toc_link_format') == 0
|
||||
for l in range(h_level-1)
|
||||
if headers_levels[l][0] != ''
|
||||
let h_complete_id .= headers_levels[l][0].'#'
|
||||
endif
|
||||
endfor
|
||||
let h_complete_id .= headers_levels[h_level-1][0]
|
||||
|
||||
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
|
||||
let h_complete_id .= headers_levels[h_level-1][0]
|
||||
|
||||
call add(complete_header_infos, [h_level, h_complete_id, h_text])
|
||||
endfor
|
||||
@ -1927,8 +1924,10 @@ function! vimwiki#base#table_of_contents(create)
|
||||
for [lvl, link, desc] in complete_header_infos
|
||||
if vimwiki#vars#get_wikilocal('syntax') == 'markdown'
|
||||
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')
|
||||
else
|
||||
let link_tpl = vimwiki#vars#get_global('WikiLinkTemplate1')
|
||||
endif
|
||||
let link = s:safesubstitute(link_tpl, '__LinkUrl__',
|
||||
\ '#'.link, '')
|
||||
|
@ -145,6 +145,7 @@ function! s:read_global_settings_from_user()
|
||||
\ 'auto_chdir': {'type': type(0), 'default': 0, 'min': 0, 'max': 1},
|
||||
\ 'autowriteall': {'type': type(0), 'default': 1, 'min': 0, 'max': 1},
|
||||
\ '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},
|
||||
\ '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},
|
||||
\ 'toc_header': {'type': type(''), 'default': 'Contents', 'min_length': 1},
|
||||
\ '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},
|
||||
\ 'use_calendar': {'type': type(0), 'default': 1, 'min': 0, 'max': 1},
|
||||
\ 'use_mouse': {'type': type(0), 'default': 0, 'min': 0, 'max': 1},
|
||||
|
@ -878,6 +878,8 @@ is decorated: >
|
||||
|
||||
*bold text*
|
||||
_italic text_
|
||||
_*bold italic text*_
|
||||
*_bold italic text _*
|
||||
~~strikeout text~~
|
||||
`code (no syntax) text`
|
||||
super^script^
|
||||
@ -2909,6 +2911,26 @@ URLs and hides markers and URL for links that have a description.
|
||||
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*
|
||||
|
||||
@ -2994,6 +3016,21 @@ are from 1 to 6.
|
||||
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*
|
||||
|
||||
|
@ -318,8 +318,9 @@ execute 'syntax match VimwikiCodeT /'.vimwiki#vars#get_syntaxlocal('rxCode').
|
||||
" <hr> horizontal rule
|
||||
execute 'syntax match VimwikiHR /'.vimwiki#vars#get_syntaxlocal('rxHR').'/'
|
||||
|
||||
execute 'syntax region VimwikiPre start=/'.vimwiki#vars#get_syntaxlocal('rxPreStart').
|
||||
\ '/ end=/'.vimwiki#vars#get_syntaxlocal('rxPreEnd').'/ contains=@Spell'
|
||||
let concealpre = vimwiki#vars#get_global('conceal_pre') ? ' concealends' : ''
|
||||
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').
|
||||
\ '/ 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 VimwikiPreT VimwikiPre
|
||||
hi def link VimwikiPreDelim VimwikiPre
|
||||
|
||||
hi def link VimwikiMath Number
|
||||
hi def link VimwikiMathT VimwikiMath
|
||||
|
Loading…
Reference in New Issue
Block a user