Skip to content

Commit 95480d5

Browse files
author
Anthony Naddeo
committed
Made concealing configurable.
Users can now add options to configure whether or not the conceal feature isused to shorten urls and hide quotes/underscores for formatting. To disable all concealing: let g:notes_coneal_code = 0 let g:notes_coneal_italics = 0 let g:notes_coneal_bold = 0 let g:notes_coneal_url = 0 This was added because some plugins don't play nicely with concealing. In particular, the indentLines plugin is conflicting with coneal on OSX (at least).
1 parent d306012 commit 95480d5

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

syntax/notes.vim

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ highlight def link notesSingleQuoted Special
5757
highlight def link notesDoubleQuoted String
5858

5959
" Highlight inline code fragments (same as Markdown syntax). {{{2
60-
if has('conceal')
60+
if has('conceal') && !exists('g:notes_conceal_code')
6161
syntax region notesInlineCode matchgroup=notesInlineCodeMarker start=/`/ end=/`/ concealends
6262
highlight link notesItalicMarker notesInlineCodeMarker
6363
else
@@ -67,7 +67,7 @@ syntax cluster notesInline add=notesInlineCode
6767
highlight def link notesInlineCode Special
6868

6969
" Highlight text emphasized in italic font. {{{2
70-
if has('conceal')
70+
if has('conceal') && !exists('g:notes_conceal_italics')
7171
syntax region notesItalic matchgroup=notesItalicMarker start=/\<_\k\@=/ end=/_\>\|\n/ contains=@Spell concealends
7272
highlight link notesItalicMarker notesHiddenMarker
7373
else
@@ -77,7 +77,7 @@ syntax cluster notesInline add=notesItalic
7777
highlight notesItalic gui=italic cterm=italic
7878

7979
" Highlight text emphasized in bold font. {{{2
80-
if has('conceal')
80+
if has('conceal') && !exists('g:notes_conceal_bold')
8181
syntax region notesBold matchgroup=notesBoldMarker start=/\*\k\@=/ end=/\S\@<=\*/ contains=@Spell concealends
8282
highlight link notesBoldMarker notesHiddenMarker
8383
else
@@ -97,7 +97,7 @@ highlight def link notesTextURL notesSubtleURL
9797
execute printf('syntax match notesRealURL @%s@', g:xolox#notes#url_pattern)
9898
syntax cluster notesInline add=notesRealURL
9999
highlight def link notesRealURL notesSubtleURL
100-
if has('conceal')
100+
if has('conceal') && !exists('g:notes_conceal_url')
101101
syntax match notesUrlScheme @\(mailto:\|javascript:\|\w\{3,}://\)@ contained containedin=notesRealURL conceal
102102
highlight def link notesUrlScheme notesRealURL
103103
endif

0 commit comments

Comments
 (0)