Add g:startify_padding_left

Closes https://github.com/mhinz/vim-startify/pull/250
This commit is contained in:
Nate 2016-11-26 02:23:02 -08:00 committed by Marco Hinz
parent 43a322edb6
commit c14a677496
No known key found for this signature in database
GPG key ID: 1C980A1B657B4A4F
2 changed files with 19 additions and 18 deletions

View file

@ -9,12 +9,13 @@ if exists("b:current_syntax")
endif
let s:sep = startify#get_separator()
let s:padding_left = repeat(' ', get(g:, 'startify_padding_left', 3))
syntax sync fromstart
syntax match StartifyBracket /.*\%9c/ contains=
execute 'syntax match StartifyBracket /.*\%'. (len(s:padding_left) + 6) .'c/ contains=
\ StartifyNumber,
\ StartifySelect,
\ StartifySelect'
syntax match StartifySpecial /\V<empty buffer>\|<quit>/
syntax match StartifyNumber /^\s*\[\zs[^BSVT]\{-}\ze\]/
syntax match StartifySelect /^\s*\[\zs[BSVT]\{-}\ze\]/
@ -25,7 +26,7 @@ syntax match StartifyFile /.*/ contains=
\ StartifySpecial,
execute 'syntax match StartifySlash /\'. s:sep .'/'
execute 'syntax match StartifyPath /\%9c.*\'. s:sep .'/ contains=StartifySlash,StartifyVar'
execute 'syntax match StartifyPath /\%'. (len(s:padding_left) + 6) .'c.*\'. s:sep .'/ contains=StartifySlash,StartifyVar'
execute 'syntax region StartifyHeader start=/\%1l/ end=/\%'. (len(g:startify_header) + 2) .'l/'