diff --git a/after/plugin/indentLine.vim b/after/plugin/indentLine.vim index 443abf1..8941c06 100644 --- a/after/plugin/indentLine.vim +++ b/after/plugin/indentLine.vim @@ -19,6 +19,7 @@ let g:indentLine_enabled = get(g:, 'indentLine_enabled', 1) let g:indentLine_fileType = get(g:, 'indentLine_fileType', []) let g:indentLine_fileTypeExclude = get(g:, 'indentLine_fileTypeExclude', []) 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_maxLines = get(g:, 'indentLine_maxLines', 3000) let g:indentLine_setColors = get(g:, 'indentLine_setColors', 1) @@ -210,6 +211,10 @@ function! s:Filter() return 0 endif + if index(g:indentLine_bufTypeExclude, &buftype) != -1 + return 0 + endif + if len(g:indentLine_fileType) != 0 && index(g:indentLine_fileType, &filetype) == -1 return 0 endif diff --git a/doc/indentLine.txt b/doc/indentLine.txt index 4bf8fd0..bee22e0 100644 --- a/doc/indentLine.txt +++ b/doc/indentLine.txt @@ -99,7 +99,14 @@ g:indentLine_fileTypeExclude *g:indentLine_fileTypeExclude* When opening these types of files, the plugin is disabled by default. 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* This variable specify a list of buffer names, which can be