Add highlighting for custom footer

This commit is contained in:
Marco Hinz 2013-09-04 09:25:33 +02:00
parent 3b362f6514
commit 85ce548261
3 changed files with 23 additions and 0 deletions

View file

@ -31,6 +31,11 @@ endfunction
let s:sep = startify#get_separator() let s:sep = startify#get_separator()
" Function: #get_lastline {{{1
function! startify#get_lastline() abort
return s:lastline
endfunction
" Function: #insane_in_the_membrane {{{1 " Function: #insane_in_the_membrane {{{1
function! startify#insane_in_the_membrane() abort function! startify#insane_in_the_membrane() abort
if !empty(v:servername) && exists('g:startify_skiplist_server') if !empty(v:servername) && exists('g:startify_skiplist_server')
@ -107,6 +112,8 @@ function! startify#insane_in_the_membrane() abort
1 1
call cursor((s:show_special ? 4 : 2) + s:headoff, 5) call cursor((s:show_special ? 4 : 2) + s:headoff, 5)
doautocmd <nomodeline> startify User
endfunction endfunction
" Function: #session_load {{{1 " Function: #session_load {{{1

View file

@ -89,6 +89,7 @@ default values.
|g:startify_change_to_dir| |g:startify_change_to_dir|
|g:startify_custom_indices| |g:startify_custom_indices|
|g:startify_custom_header| |g:startify_custom_header|
|g:startify_custom_footer|
|g:startify_restore_position| |g:startify_restore_position|
|g:startify_empty_buffer_key| |g:startify_empty_buffer_key|
|g:startify_enable_special| |g:startify_enable_special|
@ -300,6 +301,13 @@ Example:
\ ] \ ]
============- *g:startify_custom_footer*
let g:startify_custom_footer = ''
Same as the custom header, but shown at the bottom of the startify buffer.
============================================================================== ==============================================================================
4. Commands *startify-commands* 4. Commands *startify-commands*
@ -327,6 +335,7 @@ these groups:
StartifyBracket [,] StartifyBracket [,]
StartifyFile the actual file StartifyFile the actual file
StartifyFooter the custom footer
StartifyHeader the custom header StartifyHeader the custom header
StartifyNumber the numbers between [] StartifyNumber the numbers between []
StartifyPath the path to a file StartifyPath the path to a file
@ -336,6 +345,7 @@ these groups:
Example: (my terminal emulator supports 256 colors) Example: (my terminal emulator supports 256 colors)
hi StartifyBracket ctermfg=240 hi StartifyBracket ctermfg=240
hi StartifyFooter ctermfg=111
hi StartifyHeader ctermfg=203 hi StartifyHeader ctermfg=203
hi StartifyNumber ctermfg=215 hi StartifyNumber ctermfg=215
hi StartifyPath ctermfg=245 hi StartifyPath ctermfg=245

View file

@ -21,6 +21,12 @@ if exists('g:startify_custom_header')
execute 'syntax region StartifyHeader start=/\%1l/ end=/\%'. (len(g:startify_custom_header) + 2) .'l/' execute 'syntax region StartifyHeader start=/\%1l/ end=/\%'. (len(g:startify_custom_header) + 2) .'l/'
endif endif
if exists('g:startify_custom_footer')
autocmd startify User <buffer>
\ execute 'syntax region StartifyFooter start=/\%'. (startify#get_lastline() + 1) .'l/ end=/*/' |
\ autocmd! startify User <buffer>
endif
highlight default link StartifyHeader Normal highlight default link StartifyHeader Normal
highlight default link StartifyBracket Delimiter highlight default link StartifyBracket Delimiter
highlight default link StartifyNumber Number highlight default link StartifyNumber Number