mirror of
https://github.com/Yggdroot/indentLine.git
synced 2025-12-08 04:54:45 +08:00
Allow to exclude by buffer types (#235)
* Filter by buftype * Add docs * Typo
This commit is contained in:
committed by
Yggdroot
parent
86de3cdbda
commit
7a7e368205
@@ -19,6 +19,7 @@ let g:indentLine_enabled = get(g:, 'indentLine_enabled', 1)
|
|||||||
let g:indentLine_fileType = get(g:, 'indentLine_fileType', [])
|
let g:indentLine_fileType = get(g:, 'indentLine_fileType', [])
|
||||||
let g:indentLine_fileTypeExclude = get(g:, 'indentLine_fileTypeExclude', [])
|
let g:indentLine_fileTypeExclude = get(g:, 'indentLine_fileTypeExclude', [])
|
||||||
let g:indentLine_bufNameExclude = get(g:, 'indentLine_bufNameExclude', [])
|
let g:indentLine_bufNameExclude = get(g:, 'indentLine_bufNameExclude', [])
|
||||||
|
let g:indentLine_bufTypeExclude = get(g:, 'indentLine_bufTypeExclude', [])
|
||||||
let g:indentLine_showFirstIndentLevel = get(g:, 'indentLine_showFirstIndentLevel', 0)
|
let g:indentLine_showFirstIndentLevel = get(g:, 'indentLine_showFirstIndentLevel', 0)
|
||||||
let g:indentLine_maxLines = get(g:, 'indentLine_maxLines', 3000)
|
let g:indentLine_maxLines = get(g:, 'indentLine_maxLines', 3000)
|
||||||
let g:indentLine_setColors = get(g:, 'indentLine_setColors', 1)
|
let g:indentLine_setColors = get(g:, 'indentLine_setColors', 1)
|
||||||
@@ -210,6 +211,10 @@ function! s:Filter()
|
|||||||
return 0
|
return 0
|
||||||
endif
|
endif
|
||||||
|
|
||||||
|
if index(g:indentLine_bufTypeExclude, &buftype) != -1
|
||||||
|
return 0
|
||||||
|
endif
|
||||||
|
|
||||||
if len(g:indentLine_fileType) != 0 && index(g:indentLine_fileType, &filetype) == -1
|
if len(g:indentLine_fileType) != 0 && index(g:indentLine_fileType, &filetype) == -1
|
||||||
return 0
|
return 0
|
||||||
endif
|
endif
|
||||||
|
|||||||
@@ -99,7 +99,14 @@ g:indentLine_fileTypeExclude *g:indentLine_fileTypeExclude*
|
|||||||
When opening these types of files, the plugin is disabled by
|
When opening these types of files, the plugin is disabled by
|
||||||
default.
|
default.
|
||||||
e.g. let g:indentLine_fileTypeExclude = ['text', 'sh']
|
e.g. let g:indentLine_fileTypeExclude = ['text', 'sh']
|
||||||
Default value is [] which means no file types is excluded.
|
Default value is [] which means no file types are excluded.
|
||||||
|
|
||||||
|
g:indentLine_bufTypeExclude *g:indentLine_bufTypeExclude*
|
||||||
|
This variable specify a list of buffer types.
|
||||||
|
When opening these types of buffers, the plugin is disabled
|
||||||
|
by default.
|
||||||
|
e.g. let g:indentLine_bufTypeExclude = ['help', 'terminal']
|
||||||
|
Default value is [] which means no buffer type is excluded.
|
||||||
|
|
||||||
g:indentLine_bufNameExclude *g:indentLine_bufNameExclude*
|
g:indentLine_bufNameExclude *g:indentLine_bufNameExclude*
|
||||||
This variable specify a list of buffer names, which can be
|
This variable specify a list of buffer names, which can be
|
||||||
|
|||||||
Reference in New Issue
Block a user