Trigger User autocmd for people to hook into

References #107.
This commit is contained in:
Marco Hinz 2014-09-11 17:50:01 +02:00
parent b92a8f1b51
commit 1a5586e0da
3 changed files with 11 additions and 3 deletions

View file

@ -155,7 +155,7 @@ function! startify#insane_in_the_membrane(callingbuffer) abort
call cursor(s:firstline + (s:show_special ? 2 : 0), 5)
silent! doautocmd <nomodeline> startify User Startified
silent! doautocmd <nomodeline> User Startified
endfunction
" Function: #session_load {{{1

View file

@ -30,6 +30,7 @@ CONTENTS *startify-contents*
INTRO .......................................... |startify-intro|
USAGE .......................................... |startify-usage|
OPTIONS ........................................ |startify-options|
AUTOCMD ........................................ |startify-autocmd|
COMMANDS ....................................... |startify-commands|
MAPPINGS ....................................... |startify-mappings|
COLORS ......................................... |startify-colors|
@ -429,6 +430,14 @@ Don't run Startify at Vim startup. You can still call it anytime via
Show filenames relative to the current working directory instead of as
absolute paths.
==============================================================================
AUTOCMD *startify-autocmd*
In case you want to alter the startify buffer to cause all kinds of mayhem, an
user autocmd is issued. You can hook into it like this:
>
autocmd User Startified let &l:stl = ' This statusline rocks!'
<
==============================================================================
COMMANDS *startify-commands*
>

View file

@ -33,8 +33,7 @@ endif
if exists('g:startify_custom_footer')
autocmd startify User Startified
\ execute 'syntax region StartifyFooter start=/\%'. (startify#get_lastline() + 1) .'l/ end=/*/' |
\ autocmd! startify User
\ execute 'syntax region StartifyFooter start=/\%'. (startify#get_lastline() + 1) .'l/ end=/*/'
endif
highlight default link StartifyBracket Delimiter