New option: g:startify_update_oldfiles

References #192.
This commit is contained in:
Marco Hinz 2016-03-07 13:21:16 +01:00
parent 2eaa25ba57
commit de709a4dbe
2 changed files with 16 additions and 3 deletions

View file

@ -98,6 +98,7 @@ default values.
|g:startify_list_order|
|g:startify_relative_path|
|g:startify_skiplist|
|g:startify_update_oldfiles|
Misc options:~
|g:startify_custom_footer|
@ -200,6 +201,15 @@ Example:
<
The number of files to list.
------------------------------------------------------------------------------
*g:startify_update_oldfiles*
>
let g:startify_update_oldfiles = 0
<
Usually |v:oldfiles| only gets updated when Vim exits. Using this option updates
it on-the-fly, so that :Startify is always up-to-date.
------------------------------------------------------------------------------
*g:startify_session_autoload*
>
@ -805,6 +815,7 @@ This is my configuration..
let g:startify_files_number = 8
let g:startify_relative_path = 1
let g:startify_change_to_dir = 1
let g:startify_update_oldfiles = 1
let g:startify_session_autoload = 1
let g:startify_session_persistence = 1
let g:startify_session_delete_buffers = 1

View file

@ -42,9 +42,11 @@ function! s:genesis()
call startify#insane_in_the_membrane()
endif
endif
call map(v:oldfiles, 'fnamemodify(v:val, ":p")')
autocmd startify BufNewFile,BufRead,BufFilePre *
\ call s:update_oldfiles(expand('<afile>:p'))
if get(g:, 'startify_update_oldfiles')
call map(v:oldfiles, 'fnamemodify(v:val, ":p")')
autocmd startify BufNewFile,BufRead,BufFilePre *
\ call s:update_oldfiles(expand('<afile>:p'))
endif
autocmd! startify VimEnter
endfunction