New highlight group: StartifyVar

References #197.
This commit is contained in:
Marco Hinz 2016-02-12 14:49:01 +01:00
parent 9e4a159637
commit 5c50a1c669
2 changed files with 5 additions and 1 deletions

View file

@ -478,6 +478,7 @@ relative by nature.
let g:startify_use_env = 0
<
Show environment variables in path, if their name is shorter than their value.
See |startify-colors| for highlighting them.
$PWD and $OLDPWD are ignored.
@ -593,6 +594,7 @@ these groups:
StartifySelect | selected entries | linked to Title
StartifySlash | slashes in paths | <none>
StartifySpecial | <empty buffer>,<quit> | <none>
StartifyVar | environment variables | linked to StartifyPath
Example: (my terminal emulator supports 256 colors)
>

View file

@ -18,13 +18,14 @@ syntax match StartifyBracket /.*\%9c/ contains=
syntax match StartifySpecial /\V<empty buffer>\|<quit>/
syntax match StartifyNumber /^\s*\[\zs[^BSVT]\{-}\ze\]/
syntax match StartifySelect /^\s*\[\zs[BSVT]\{-}\ze\]/
syntax match StartifyVar /\$[^\/]\+/
syntax match StartifyFile /.*/ contains=
\ StartifyBracket,
\ StartifyPath,
\ StartifySpecial,
execute 'syntax match StartifySlash /\'. s:sep .'/'
execute 'syntax match StartifyPath /\%9c.*\'. s:sep .'/ contains=StartifySlash'
execute 'syntax match StartifyPath /\%9c.*\'. s:sep .'/ contains=StartifySlash,StartifyVar'
if exists('g:startify_custom_header')
execute 'syntax region StartifyHeader start=/\%1l/ end=/\%'. (len(g:startify_custom_header) + 2) .'l/'
@ -50,5 +51,6 @@ highlight default link StartifySection Statement
highlight default link StartifySelect Title
highlight default link StartifySlash Delimiter
highlight default link StartifySpecial Comment
highlight default link StartifyVar StartifyPath
let b:current_syntax = 'startify'