]> git.madduck.net Git - etc/vim.git/commitdiff

madduck's git repository

Every one of the projects in this repository is available at the canonical URL git://git.madduck.net/madduck/pub/<projectpath> — see each project's metadata for the exact URL.

All patches and comments are welcome. Please squash your changes to logical commits before using git-format-patch and git-send-email to patches@git.madduck.net. If you'd read over the Git project's submission guidelines and adhered to them, I'd be especially grateful.

SSH access, as well as push access can be individually arranged.

If you use my repositories frequently, consider adding the following snippet to ~/.gitconfig and using the third clone URL listed for each project:

[url "git://git.madduck.net/madduck/"]
  insteadOf = madduck:

Add 'g:vim_markdown_conceal'
authorBOACK <BOACK@users.noreply.github.com>
Sat, 13 Feb 2016 13:30:51 +0000 (22:30 +0900)
committerHiroshi Shirosaki <h.shirosaki@gmail.com>
Fri, 19 Feb 2016 00:14:25 +0000 (09:14 +0900)
Add variable 'g:vim_markdown_conceal' to enable/disable markdown conceal.
In vimrc,
let g:vim_markdown_conceal = 1 " conceal enable
let g:vim_markdown_conceal = 0 " conceal disable
Default : 1

README.md
doc/vim-markdown.txt
ftplugin/markdown.vim
syntax/markdown.vim

index 6c043db87a5f58b79ee3498991fd5abc4bd50678..b3681a53b698a06a84c177ca7107fdde6e20a171 100644 (file)
--- a/README.md
+++ b/README.md
@@ -127,10 +127,10 @@ Concealing is set for some syntax.
 
 For example, conceal `[link text](link url)` as just `link text`.
 
 
 For example, conceal `[link text](link url)` as just `link text`.
 
-To enable/disable conceal use Vim's standard conceal configuration.
+To disable conceal, add the following to your '.vimrc':
 
 ```vim
 
 ```vim
-set conceallevel=2
+let g:vim_markdown_conceal = 0
 ```
 
 ### Syntax extensions
 ```
 
 ### Syntax extensions
index 4b3d9299045bafd039286568f6c229b173c1fcba..10d94d2cf2d2ef28f17c29b556391aaac70c1886 100644 (file)
@@ -142,9 +142,9 @@ Concealing is set for some syntax.
 
 For example, conceal '[link text](link url)' as just 'link text'.
 
 
 For example, conceal '[link text](link url)' as just 'link text'.
 
-To enable/disable conceal use Vim's standard conceal configuration.
+To disable conceal, add the following to your '.vimrc':
 >
 >
-  set conceallevel=2
+  let g:vim_markdown_conceal = 0
 <
 -------------------------------------------------------------------------------
                                                *vim-markdown-syntax-extensions*
 <
 -------------------------------------------------------------------------------
                                                *vim-markdown-syntax-extensions*
index 2f0c19fdd5db27943e27422af9f6f83c1931a154..c7832d75d010d8761d4a6bee3558eaea9c06cc9b 100644 (file)
@@ -658,7 +658,7 @@ function! s:MarkdownHighlightSources(force)
                 let include = '@' . toupper(filetype)
             endif
             let command = 'syntax region %s matchgroup=%s start="^\s*```%s$" matchgroup=%s end="\s*```$" keepend contains=%s%s'
                 let include = '@' . toupper(filetype)
             endif
             let command = 'syntax region %s matchgroup=%s start="^\s*```%s$" matchgroup=%s end="\s*```$" keepend contains=%s%s'
-            execute printf(command, group, startgroup, ft, endgroup, include, has('conceal') ? ' concealends' : '')
+            execute printf(command, group, startgroup, ft, endgroup, include, has('conceal') && get(g:, 'vim_markdown_conceal', 1) ? ' concealends' : '')
             execute printf('syntax cluster mkdNonListItem add=%s', group)
 
             let b:mkd_known_filetypes[ft] = 1
             execute printf('syntax cluster mkdNonListItem add=%s', group)
 
             let b:mkd_known_filetypes[ft] = 1
index becb12e15ca858bf8750b1f0a65031db7b4f3f49..52369c349a9c02c7fad1965d7dbb0f950dd19d23 100644 (file)
@@ -36,7 +36,7 @@ syn sync linebreaks=1
 
 let s:conceal = ''
 let s:concealends = ''
 
 let s:conceal = ''
 let s:concealends = ''
-if has('conceal')
+if has('conceal') && get(g:, 'vim_markdown_conceal', 1)
   let s:conceal = ' conceal'
   let s:concealends = ' concealends'
 endif
   let s:conceal = ' conceal'
   let s:concealends = ' concealends'
 endif