From d8309be06a202b1bd6a9a2dd8eacc6e9b10e459b Mon Sep 17 00:00:00 2001 From: Hiroshi Shirosaki Date: Tue, 19 Jan 2016 18:18:04 +0900 Subject: [PATCH 1/1] Concealing links Add conceal to syntax link to help readability. Fix #244 --- README.md | 12 ++++++++++++ syntax/markdown.vim | 13 ++++++++++--- test/syntax.vader | 14 ++++++++++++++ 3 files changed, 36 insertions(+), 3 deletions(-) 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="\\\@