mirror of
https://github.com/Yggdroot/indentLine.git
synced 2025-12-09 05:24:49 +08:00
@@ -1,7 +1,4 @@
|
|||||||
|
|
||||||
" Script Name: indentLine.vim
|
" Script Name: indentLine.vim
|
||||||
" Version: 1.0.5
|
|
||||||
" Last Change: April 1, 2013
|
|
||||||
" Author: Yggdroot <archofortune@gmail.com>
|
" Author: Yggdroot <archofortune@gmail.com>
|
||||||
"
|
"
|
||||||
" Description: To show the indention levels with thin vertical lines
|
" Description: To show the indention levels with thin vertical lines
|
||||||
@@ -128,14 +125,19 @@ function! s:Setup()
|
|||||||
endif
|
endif
|
||||||
endfor
|
endfor
|
||||||
|
|
||||||
|
if ! exists("b:indentLine_bufNr")
|
||||||
|
let b:indentLine_bufNr = bufnr('%')
|
||||||
|
let g:indentLine_bufNr = bufnr('%')
|
||||||
|
elseif g:indentLine_bufNr != bufnr('%') && &hidden
|
||||||
|
let g:indentLine_bufNr = bufnr('%')
|
||||||
|
return
|
||||||
|
endif
|
||||||
|
|
||||||
if ! exists("g:indentLine_noConcealCursor")
|
if ! exists("g:indentLine_noConcealCursor")
|
||||||
setlocal concealcursor=inc
|
setlocal concealcursor=inc
|
||||||
endif
|
endif
|
||||||
setlocal conceallevel=2
|
setlocal conceallevel=2
|
||||||
|
|
||||||
if !&hidden || !exists("b:indentLine_set")
|
|
||||||
let b:indentLine_set = 1
|
|
||||||
|
|
||||||
if &filetype is# ""
|
if &filetype is# ""
|
||||||
call s:InitColor()
|
call s:InitColor()
|
||||||
endif
|
endif
|
||||||
@@ -147,7 +149,6 @@ function! s:Setup()
|
|||||||
if b:indentLine_enabled
|
if b:indentLine_enabled
|
||||||
call s:SetIndentLine()
|
call s:SetIndentLine()
|
||||||
endif
|
endif
|
||||||
endif
|
|
||||||
endfunction
|
endfunction
|
||||||
|
|
||||||
"{{{1 augroup indentLine
|
"{{{1 augroup indentLine
|
||||||
@@ -155,7 +156,6 @@ augroup indentLine
|
|||||||
autocmd!
|
autocmd!
|
||||||
autocmd BufWinEnter * call <SID>Setup()
|
autocmd BufWinEnter * call <SID>Setup()
|
||||||
autocmd BufRead,BufNewFile,ColorScheme * call <SID>InitColor()
|
autocmd BufRead,BufNewFile,ColorScheme * call <SID>InitColor()
|
||||||
autocmd Syntax * call <SID>InitColor() | call <SID>SetIndentLine()
|
|
||||||
augroup END
|
augroup END
|
||||||
|
|
||||||
"{{{1 commands
|
"{{{1 commands
|
||||||
|
|||||||
Reference in New Issue
Block a user