From 57143c2c748b70aca5661b618ce67dcb796fee03 Mon Sep 17 00:00:00 2001 From: EinfachToll Date: Sun, 22 Jun 2014 17:43:26 +0200 Subject: [PATCH] Fix highlight of anchor links when maxhi is on --- syntax/vimwiki.vim | 3 ++- syntax/vimwiki_markdown_custom.vim | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/syntax/vimwiki.vim b/syntax/vimwiki.vim index 786ee48..17b9cd8 100644 --- a/syntax/vimwiki.vim +++ b/syntax/vimwiki.vim @@ -200,7 +200,8 @@ function! s:highlight_existing_links() "{{{ " Conditional highlighting that depends on the existence of a wiki file or " directory is only available for *schemeless* wiki links " Links are set up upon BufEnter (see plugin/...) - let safe_links = vimwiki#base#file_pattern(b:existing_wikifiles) + let safe_links = '\%('.vimwiki#base#file_pattern(b:existing_wikifiles) . + \ '\%(#[^|]*\)\?\|#[^|]*\)' " Wikilink Dirs set up upon BufEnter (see plugin/...) let safe_dirs = vimwiki#base#file_pattern(b:existing_wikidirs) diff --git a/syntax/vimwiki_markdown_custom.vim b/syntax/vimwiki_markdown_custom.vim index 502ebdd..af9ab96 100644 --- a/syntax/vimwiki_markdown_custom.vim +++ b/syntax/vimwiki_markdown_custom.vim @@ -242,7 +242,8 @@ function! s:highlight_existing_links() "{{{ " Conditional highlighting that depends on the existence of a wiki file or " directory is only available for *schemeless* wiki links " Links are set up upon BufEnter (see plugin/...) - let safe_links = vimwiki#base#file_pattern(b:existing_wikifiles) + let safe_links = '\%('.vimwiki#base#file_pattern(b:existing_wikifiles) . + \ '\%(#[^|]*\)\?\|#[^|]*\)' " Wikilink1 Dirs set up upon BufEnter (see plugin/...) let safe_dirs = vimwiki#base#file_pattern(b:existing_wikidirs) " Ref links are cached