mirror of
https://github.com/Yggdroot/indentLine.git
synced 2025-12-07 04:34:26 +08:00
initial upload
This commit is contained in:
29
indentLine.vim
Normal file
29
indentLine.vim
Normal file
@@ -0,0 +1,29 @@
|
||||
" Script Name: indentLine.vim
|
||||
" Version: 1.0.0
|
||||
" Last Change: Oct 20, 2012
|
||||
" Author: Yggdroot <archofortune@gmail.com>
|
||||
"
|
||||
" Description: To show the indent line
|
||||
|
||||
if exists("g:loaded_indentLine")
|
||||
finish
|
||||
endif
|
||||
let g:loaded_indentLine = 1
|
||||
|
||||
if (has("gui_running"))
|
||||
hi Conceal guifg=grey guibg=bg
|
||||
else
|
||||
hi Conceal ctermfg=8 ctermbg=bg
|
||||
endif
|
||||
|
||||
set conceallevel=2
|
||||
set concealcursor=inc
|
||||
|
||||
function! SetIndentLine()
|
||||
for i in range(&shiftwidth+1, 100, &shiftwidth)
|
||||
exe 'syn match IndentLine /\(^\s\+\)\@<=\%'.i.'v / conceal cchar=|'
|
||||
endfor
|
||||
endfunction
|
||||
|
||||
autocmd BufRead * call SetIndentLine()
|
||||
autocmd ColorScheme * hi Conceal guifg=grey guibg=bg ctermfg=8
|
||||
Reference in New Issue
Block a user