Don't change conceal behavior of wiki elements with max_urlsave option.
Closes #539
This commit is contained in:
parent
047947cbbe
commit
c9229244a8
@ -2962,7 +2962,8 @@ Default: 1
|
||||
|
||||
Setting the value of |g:vimwiki_url_maxsave| to 0 will prevent any link
|
||||
shortening: you will see the full URL in all types of links, with no parts
|
||||
being concealed. Concealing of one-character markers is not affected.
|
||||
being concealed. This option does not affect the concealing of wiki elements
|
||||
such as bold, italic, wikilinks, etc.
|
||||
|
||||
When positive, the value determines the maximum number of characters that
|
||||
are retained at the end after concealing the middle part of a long URL.
|
||||
|
@ -175,15 +175,14 @@ execute 'syn match VimwikiSubScript contained /'.
|
||||
\ vimwiki#vars#get_syntaxlocal('char_subscript').'/'.s:conceal
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
let s:options = ' contained transparent contains=NONE'
|
||||
if exists("+conceallevel")
|
||||
let s:options .= s:conceal
|
||||
endif
|
||||
|
||||
" A shortener for long URLs: LinkRest (a middle part of the URL) is concealed
|
||||
" VimwikiLinkRest group is left undefined if link shortening is not desired
|
||||
if exists("+conceallevel") && vimwiki#vars#get_global('url_maxsave') > 0
|
||||
let s:options .= s:conceal
|
||||
execute 'syn match VimwikiLinkRest `\%(///\=[^/ \t]\+/\)\zs\S\+\ze'
|
||||
\.'\%([/#?]\w\|\S\{'.vimwiki#vars#get_global('url_maxsave').'}\)`'.' cchar=~'.s:options
|
||||
endif
|
||||
|
Loading…
Reference in New Issue
Block a user