mirror of
https://github.com/Yggdroot/indentLine.git
synced 2025-12-07 20:54:26 +08:00
@@ -52,6 +52,10 @@ if !exists("g:indentLine_showFirstIndentLevel")
|
||||
let g:indentLine_showFirstIndentLevel = 0
|
||||
endif
|
||||
|
||||
if !exists("g:indentLine_maxLines")
|
||||
let g:indentLine_maxLines = 3000
|
||||
endif
|
||||
|
||||
set conceallevel=1
|
||||
set concealcursor=inc
|
||||
|
||||
@@ -90,8 +94,9 @@ function! <SID>SetIndentLine()
|
||||
exec 'syn match IndentLine /^ / containedin=ALL conceal cchar=' . g:indentLine_first_char
|
||||
endif
|
||||
|
||||
let pattern = line('$') < g:indentLine_maxLines ? 'v' : 'c'
|
||||
for i in range(space+1, space * g:indentLine_indentLevel + 1, space)
|
||||
exec 'syn match IndentLine /\(^\s\+\)\@<=\%'.i.'v / containedin=ALL conceal cchar=' . g:indentLine_char
|
||||
exec 'syn match IndentLine /\%(^\s\+\)\@<=\%'.i.pattern.' / containedin=ALL conceal cchar=' . g:indentLine_char
|
||||
endfor
|
||||
endfunction
|
||||
|
||||
|
||||
@@ -84,6 +84,12 @@ g:indentLine_bufNameExclude *g:indentLine_bufNameExclude*
|
||||
e.g. let g:indentLine_bufNameExclude = ['_.*', 'NERD_tree.*']
|
||||
Default value is [].
|
||||
|
||||
g:indentLine_maxLines *g:indentLine_maxLines*
|
||||
This variable specify a number, when the number of buffer's
|
||||
lines exceed it, the plugin try to use another pattern to make
|
||||
the performance better.
|
||||
Default value is 3000.
|
||||
|
||||
==============================================================================
|
||||
COMMANDS *indentLine-commands*
|
||||
|
||||
|
||||
Reference in New Issue
Block a user