From 86b9824b89cf52d4b748ea2a27885607c98c881a Mon Sep 17 00:00:00 2001 From: iCyMind Date: Mon, 26 Sep 2016 21:16:38 +0800 Subject: [PATCH] Providing new option g:indentLine_setConceal (#168) * add option: g:indentLine_setConceal * add g:indentLine_setConceal detail to doc and readme --- README.md | 7 ++++++- after/plugin/indentLine.vim | 4 ++++ doc/indentLine.txt | 6 ++++++ 3 files changed, 16 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index fd600d3..33c5f0c 100644 --- a/README.md +++ b/README.md @@ -48,7 +48,7 @@ This plugin enables the Vim `conceal` feature which automatically hides stretche For example, users utilizing the built in json.vim syntax file will no longer see quotation marks in their JSON files. -The default settings are: +indentLine will overwrite your "concealcursor" and "conceallevel" with default value: ``` let g:indentLine_concealcursor = 'inc' @@ -57,6 +57,11 @@ let g:indentLine_conceallevel = 2 You can customize these settings, but the plugin will not function if `conceallevel` is not set to 1 or 2. +If you want to keep your conceal settting, put this line to your vim dotfile: +``` +let g:indentLine_setConceal = 0 +``` + See the [VIM Reference Manual](http://vimdoc.sourceforge.net/htmldoc/version7.html#new-conceal) for more information on the `conceal` feature. diff --git a/after/plugin/indentLine.vim b/after/plugin/indentLine.vim index 96ff389..532cefb 100644 --- a/after/plugin/indentLine.vim +++ b/after/plugin/indentLine.vim @@ -21,6 +21,7 @@ let g:indentLine_bufNameExclude = get(g:,'indentLine_bufNameExclude',[]) let g:indentLine_showFirstIndentLevel = get(g:,'indentLine_showFirstIndentLevel',0) let g:indentLine_maxLines = get(g:,'indentLine_maxLines',3000) let g:indentLine_setColors = get(g:,'indentLine_setColors',1) +let g:indentLine_setConceal = get(g:,'indentLine_setConceal',1) let g:indentLine_faster = get(g:,'indentLine_faster',0) let g:indentLine_leadingSpaceChar = get(g:,'indentLine_leadingSpaceChar',(&encoding ==# "utf-8" && &term isnot# "linux" ? '˰' : '.')) let g:indentLine_leadingSpaceEnabled = get(g:,'indentLine_leadingSpaceEnabled',0) @@ -67,6 +68,9 @@ endfunction "{{{1 function! s:SetConcealOption() function! s:SetConcealOption() + if ! g:indentLine_setConceal + return + endif if ! exists("b:indentLine_ConcealOptionSet") let b:indentLine_ConcealOptionSet = 1 let &l:concealcursor = exists("g:indentLine_concealcursor") ? g:indentLine_concealcursor : "inc" diff --git a/doc/indentLine.txt b/doc/indentLine.txt index c3709fa..302d473 100644 --- a/doc/indentLine.txt +++ b/doc/indentLine.txt @@ -111,6 +111,12 @@ g:indentLine_faster *g:indentLine_faster* 1, default value is 0. But better performance may bring little issue with it. +g:indentLine_setConceal + The plugin will overwrite your "concealcursor" and + "conceallevel" by default. If you want to keep your setting, + set this value to 0. + Default value is 1. + g:indentLine_concealcursor *g:indentLine_concealcursor* This variable toggles cursor lines behavior. If variable exists and is empty, that is, set to '', then the indentlines