mirror of
https://github.com/Yggdroot/indentLine.git
synced 2025-12-07 12:44:27 +08:00
fix issue #28
This commit is contained in:
@@ -1,9 +1,9 @@
|
||||
" Script Name: indentLine.vim
|
||||
" Version: 1.0.5
|
||||
" Last Change: March 5, 2013
|
||||
" Last Change: April 1, 2013
|
||||
" Author: Yggdroot <archofortune@gmail.com>
|
||||
"
|
||||
" Description: To show the indent lines
|
||||
" Description: To show the indention levels with thin vertical lines
|
||||
|
||||
"{{{1 global variables
|
||||
if !has("conceal") || exists("g:indentLine_loaded")
|
||||
@@ -44,6 +44,10 @@ if !exists("g:indentLine_fileTypeExclude")
|
||||
let g:indentLine_fileTypeExclude = []
|
||||
endif
|
||||
|
||||
if !exists("g:indentLine_bufNameExclude")
|
||||
let g:indentLine_bufNameExclude = []
|
||||
endif
|
||||
|
||||
if !exists("g:indentLine_showFirstIndentLevel")
|
||||
let g:indentLine_showFirstIndentLevel = 0
|
||||
endif
|
||||
@@ -122,6 +126,10 @@ function! <SID>Setup()
|
||||
if !getbufvar("%","&hidden") || !exists("b:indentLine_set")
|
||||
let b:indentLine_set = 1
|
||||
|
||||
if &ft == ""
|
||||
call <SID>InitColor()
|
||||
endif
|
||||
|
||||
if index(g:indentLine_fileTypeExclude, &ft) != -1
|
||||
return
|
||||
endif
|
||||
@@ -130,6 +138,12 @@ function! <SID>Setup()
|
||||
return
|
||||
end
|
||||
|
||||
for name in g:indentLine_bufNameExclude
|
||||
if matchstr(bufname(''), name) == bufname('')
|
||||
return
|
||||
endif
|
||||
endfor
|
||||
|
||||
if !exists("b:indentLine_enabled")
|
||||
let b:indentLine_enabled = g:indentLine_enabled
|
||||
endif
|
||||
@@ -137,10 +151,6 @@ function! <SID>Setup()
|
||||
if b:indentLine_enabled
|
||||
call <SID>SetIndentLine()
|
||||
endif
|
||||
|
||||
if &ft == ""
|
||||
call <SID>InitColor()
|
||||
endif
|
||||
endif
|
||||
endfunction
|
||||
|
||||
|
||||
@@ -77,6 +77,13 @@ g:indentLine_fileTypeExclude *g:indentLine_fileTypeExclude*
|
||||
e.g. let g:indentLine_fileType = ['text', 'sh']
|
||||
Default value is [] which means no file types is excluded.
|
||||
|
||||
g:indentLine_bufNameExclude *g:indentLine_bufNameExclude*
|
||||
This variable specify a list of buffer names, which can be
|
||||
regular expression. If the buffer's name fall into this list,
|
||||
the indentLine won't display.
|
||||
e.g. let g:indentLine_bufNameExclude = ['_.*', 'NERD_tree.*']
|
||||
Default value is [].
|
||||
|
||||
==============================================================================
|
||||
COMMANDS *indentLine-commands*
|
||||
|
||||
|
||||
Reference in New Issue
Block a user