Skip to content
This repository was archived by the owner on Jul 29, 2023. It is now read-only.

Commit 86b9824

Browse files
icymindYggdroot
authored andcommitted
Providing new option g:indentLine_setConceal (#168)
* add option: g:indentLine_setConceal * add g:indentLine_setConceal detail to doc and readme
1 parent 0c003ed commit 86b9824

File tree

3 files changed

+16
-1
lines changed

3 files changed

+16
-1
lines changed

README.md

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ This plugin enables the Vim `conceal` feature which automatically hides stretche
4848

4949
For example, users utilizing the built in json.vim syntax file will no longer see quotation marks in their JSON files.
5050

51-
The default settings are:
51+
indentLine will overwrite your "concealcursor" and "conceallevel" with default value:
5252

5353
```
5454
let g:indentLine_concealcursor = 'inc'
@@ -57,6 +57,11 @@ let g:indentLine_conceallevel = 2
5757

5858
You can customize these settings, but the plugin will not function if `conceallevel` is not set to 1 or 2.
5959

60+
If you want to keep your conceal settting, put this line to your vim dotfile:
61+
```
62+
let g:indentLine_setConceal = 0
63+
```
64+
6065
See the [VIM Reference Manual](http://vimdoc.sourceforge.net/htmldoc/version7.html#new-conceal) for more information on the `conceal` feature.
6166

6267

after/plugin/indentLine.vim

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@ let g:indentLine_bufNameExclude = get(g:,'indentLine_bufNameExclude',[])
2121
let g:indentLine_showFirstIndentLevel = get(g:,'indentLine_showFirstIndentLevel',0)
2222
let g:indentLine_maxLines = get(g:,'indentLine_maxLines',3000)
2323
let g:indentLine_setColors = get(g:,'indentLine_setColors',1)
24+
let g:indentLine_setConceal = get(g:,'indentLine_setConceal',1)
2425
let g:indentLine_faster = get(g:,'indentLine_faster',0)
2526
let g:indentLine_leadingSpaceChar = get(g:,'indentLine_leadingSpaceChar',(&encoding ==# "utf-8" && &term isnot# "linux" ? '˰' : '.'))
2627
let g:indentLine_leadingSpaceEnabled = get(g:,'indentLine_leadingSpaceEnabled',0)
@@ -67,6 +68,9 @@ endfunction
6768

6869
"{{{1 function! s:SetConcealOption()
6970
function! s:SetConcealOption()
71+
if ! g:indentLine_setConceal
72+
return
73+
endif
7074
if ! exists("b:indentLine_ConcealOptionSet")
7175
let b:indentLine_ConcealOptionSet = 1
7276
let &l:concealcursor = exists("g:indentLine_concealcursor") ? g:indentLine_concealcursor : "inc"

doc/indentLine.txt

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -111,6 +111,12 @@ g:indentLine_faster *g:indentLine_faster*
111111
1, default value is 0. But better performance may bring little
112112
issue with it.
113113

114+
g:indentLine_setConceal
115+
The plugin will overwrite your "concealcursor" and
116+
"conceallevel" by default. If you want to keep your setting,
117+
set this value to 0.
118+
Default value is 1.
119+
114120
g:indentLine_concealcursor *g:indentLine_concealcursor*
115121
This variable toggles cursor lines behavior. If variable
116122
exists and is empty, that is, set to '', then the indentlines

0 commit comments

Comments
 (0)