New option: g:startify_session_sort
Sort your sessions by mtime by putting this in your vimrc: let g:startify_session_sort = 1 Closes #221.
This commit is contained in:
parent
54ee02272c
commit
cee51f4a9a
|
@ -570,6 +570,13 @@ function! s:show_sessions() abort
|
||||||
call s:print_section_header()
|
call s:print_section_header()
|
||||||
endif
|
endif
|
||||||
|
|
||||||
|
if get(g:, 'startify_session_sort')
|
||||||
|
function! s:sort_by_mtime(foo, bar)
|
||||||
|
return getftime(a:foo) <= getftime(a:bar)
|
||||||
|
endfunction
|
||||||
|
call sort(sfiles, 's:sort_by_mtime')
|
||||||
|
endif
|
||||||
|
|
||||||
for i in range(len(sfiles))
|
for i in range(len(sfiles))
|
||||||
let index = s:get_index_as_string(s:entry_number)
|
let index = s:get_index_as_string(s:entry_number)
|
||||||
let fname = fnamemodify(sfiles[i], ':t')
|
let fname = fnamemodify(sfiles[i], ':t')
|
||||||
|
|
|
@ -116,6 +116,7 @@ default values.
|
||||||
|g:startify_session_remove_lines|
|
|g:startify_session_remove_lines|
|
||||||
|g:startify_session_savecmds|
|
|g:startify_session_savecmds|
|
||||||
|g:startify_session_savevars|
|
|g:startify_session_savevars|
|
||||||
|
|g:startify_session_sort|
|
||||||
|
|
||||||
------------------------------------------------------------------------------
|
------------------------------------------------------------------------------
|
||||||
*g:startify_session_dir*
|
*g:startify_session_dir*
|
||||||
|
@ -412,6 +413,14 @@ Example:
|
||||||
\ 'silent !pdfreader ~/latexproject/main.pdf &'
|
\ 'silent !pdfreader ~/latexproject/main.pdf &'
|
||||||
\ ]
|
\ ]
|
||||||
<
|
<
|
||||||
|
------------------------------------------------------------------------------
|
||||||
|
*g:startify_session_sort*
|
||||||
|
>
|
||||||
|
let g:startify_session_sort = 0
|
||||||
|
<
|
||||||
|
Sort sessions by modification time (when the session files were written)
|
||||||
|
rather than alphabetically.
|
||||||
|
|
||||||
------------------------------------------------------------------------------
|
------------------------------------------------------------------------------
|
||||||
*g:startify_custom_indices*
|
*g:startify_custom_indices*
|
||||||
>
|
>
|
||||||
|
|
Loading…
Reference in a new issue