mirror of
https://github.com/tpope/vim-markdown.git
synced 2025-11-12 11:53:49 -05:00
Allow toggling of syntax concealing (#99)
Add `let g:markdown_syntax_conceal = 0` to your vimrc
This commit is contained in:
@@ -16,6 +16,10 @@ documents you can enable it in your `.vimrc` like so:
|
|||||||
|
|
||||||
let g:markdown_fenced_languages = ['html', 'python', 'bash=sh']
|
let g:markdown_fenced_languages = ['html', 'python', 'bash=sh']
|
||||||
|
|
||||||
|
To disable markdown syntax concealing add the following to your vimrc:
|
||||||
|
|
||||||
|
let g:markdown_syntax_conceal = 0
|
||||||
|
|
||||||
## License
|
## License
|
||||||
|
|
||||||
Copyright © Tim Pope. Distributed under the same terms as Vim itself.
|
Copyright © Tim Pope. Distributed under the same terms as Vim itself.
|
||||||
|
|||||||
@@ -81,7 +81,10 @@ syn region markdownLink matchgroup=markdownLinkDelimiter start="(" end=")" conta
|
|||||||
syn region markdownId matchgroup=markdownIdDelimiter start="\[" end="\]" keepend contained
|
syn region markdownId matchgroup=markdownIdDelimiter start="\[" end="\]" keepend contained
|
||||||
syn region markdownAutomaticLink matchgroup=markdownUrlDelimiter start="<\%(\w\+:\|[[:alnum:]_+-]\+@\)\@=" end=">" keepend oneline
|
syn region markdownAutomaticLink matchgroup=markdownUrlDelimiter start="<\%(\w\+:\|[[:alnum:]_+-]\+@\)\@=" end=">" keepend oneline
|
||||||
|
|
||||||
let s:concealends = has('conceal') ? ' concealends' : ''
|
let s:concealends = ''
|
||||||
|
if has('conceal') && get(g:, 'markdown_syntax_conceal', 1) == 1
|
||||||
|
let s:concealends = ' concealends'
|
||||||
|
endif
|
||||||
exe 'syn region markdownItalic matchgroup=markdownItalicDelimiter start="\S\@<=\*\|\*\S\@=" end="\S\@<=\*\|\*\S\@=" keepend contains=markdownLineStart' . s:concealends
|
exe 'syn region markdownItalic matchgroup=markdownItalicDelimiter start="\S\@<=\*\|\*\S\@=" end="\S\@<=\*\|\*\S\@=" keepend contains=markdownLineStart' . s:concealends
|
||||||
exe 'syn region markdownItalic matchgroup=markdownItalicDelimiter start="\S\@<=_\|_\S\@=" end="\S\@<=_\|_\S\@=" keepend contains=markdownLineStart' . s:concealends
|
exe 'syn region markdownItalic matchgroup=markdownItalicDelimiter start="\S\@<=_\|_\S\@=" end="\S\@<=_\|_\S\@=" keepend contains=markdownLineStart' . s:concealends
|
||||||
exe 'syn region markdownBold matchgroup=markdownBoldDelimiter start="\S\@<=\*\*\|\*\*\S\@=" end="\S\@<=\*\*\|\*\*\S\@=" keepend contains=markdownLineStart,markdownItalic' . s:concealends
|
exe 'syn region markdownBold matchgroup=markdownBoldDelimiter start="\S\@<=\*\*\|\*\*\S\@=" end="\S\@<=\*\*\|\*\*\S\@=" keepend contains=markdownLineStart,markdownItalic' . s:concealends
|
||||||
|
|||||||
Reference in New Issue
Block a user