From: Hiroshi Shirosaki Date: Tue, 19 Jan 2016 09:18:04 +0000 (+0900) Subject: Concealing links X-Git-Url: https://git.madduck.net/etc/vim.git/commitdiff_plain/d8309be06a202b1bd6a9a2dd8eacc6e9b10e459b?ds=inline;hp=-c Concealing links Add conceal to syntax link to help readability. Fix #244 --- d8309be06a202b1bd6a9a2dd8eacc6e9b10e459b diff --git a/README.md b/README.md index 6020381..ec200b6 100644 --- a/README.md +++ b/README.md @@ -113,6 +113,18 @@ It never increases its default size (half screen), it only shrinks. let g:vim_markdown_toc_autofit = 1 ``` +### Syntax Concealing + +Concealing is set for some syntax. + +For example, conceal `[link text](link url)` as just `link text`. + +To enable/disable conceal use Vim's standard conceal configuration. + +```vim +set conceallevel = 2 +``` + ### Syntax extensions The following options control which syntax extensions will be turned on. They are off by default. diff --git a/syntax/markdown.vim b/syntax/markdown.vim index b812698..46eb5a9 100644 --- a/syntax/markdown.vim +++ b/syntax/markdown.vim @@ -34,6 +34,13 @@ syn spell toplevel syn case ignore syn sync linebreaks=1 +let s:conceal = '' +let s:concealends = '' +if has('conceal') + let s:conceal = ' conceal' + let s:concealends = ' concealends' +endif + "additions to HTML groups syn region htmlItalic start="\\\@