vimwiki

Personal wiki for vim
git clone https://github.com/vimwiki/vimwiki.git
Log | Files | Refs | README | LICENSE

commit c9229244a819755f165c4f116f1b213a1a0d3c90
parent 047947cbbe9d273f97580f1bd9fd2d404e505d8d
Author: Rane Brown <rane.brown@gmail.com>
Date:   Sat, 30 Mar 2019 21:52:56 -0600

Don't change conceal behavior of wiki elements with max_urlsave option.

Closes #539

Diffstat:
Mdoc/vimwiki.txt | 3++-
Msyntax/vimwiki.vim | 7+++----
2 files changed, 5 insertions(+), 5 deletions(-)

diff --git a/doc/vimwiki.txt b/doc/vimwiki.txt @@ -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. diff --git a/syntax/vimwiki.vim b/syntax/vimwiki.vim @@ -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