parent
01066037ba
commit
22f1d58333
|
@ -110,7 +110,7 @@ function! startify#insane_in_the_membrane() abort
|
||||||
unlet item
|
unlet item
|
||||||
endfor
|
endfor
|
||||||
|
|
||||||
silent $-1,$delete _
|
silent $delete _
|
||||||
|
|
||||||
if s:show_special
|
if s:show_special
|
||||||
call append('$', ['', ' [q] <quit>'])
|
call append('$', ['', ' [q] <quit>'])
|
||||||
|
@ -372,16 +372,19 @@ endfunction
|
||||||
" Function: s:display_by_path {{{1
|
" Function: s:display_by_path {{{1
|
||||||
function! s:display_by_path(path_prefix, path_format) abort
|
function! s:display_by_path(path_prefix, path_format) abort
|
||||||
let oldfiles = s:filter_oldfiles(a:path_prefix, a:path_format)
|
let oldfiles = s:filter_oldfiles(a:path_prefix, a:path_format)
|
||||||
|
|
||||||
if !empty(oldfiles)
|
if !empty(oldfiles)
|
||||||
if exists('s:last_message')
|
if exists('s:last_message')
|
||||||
call s:print_section_header()
|
call s:print_section_header()
|
||||||
endif
|
endif
|
||||||
|
|
||||||
for [absolute_path, entry_path] in oldfiles
|
for [absolute_path, entry_path] in oldfiles
|
||||||
let index = s:get_index_as_string(s:entry_number)
|
let index = s:get_index_as_string(s:entry_number)
|
||||||
call append('$', ' ['. index .']'. repeat(' ', (3 - strlen(index))) . entry_path)
|
call append('$', ' ['. index .']'. repeat(' ', (3 - strlen(index))) . entry_path)
|
||||||
execute 'nnoremap <buffer><silent>' index ':edit' escape(absolute_path, ' ') '<bar> call <sid>check_user_options()<cr>'
|
execute 'nnoremap <buffer><silent>' index ':edit' escape(absolute_path, ' ') '<bar> call <sid>check_user_options()<cr>'
|
||||||
let s:entry_number += 1
|
let s:entry_number += 1
|
||||||
endfor
|
endfor
|
||||||
|
|
||||||
call append('$', '')
|
call append('$', '')
|
||||||
endif
|
endif
|
||||||
endfunction
|
endfunction
|
||||||
|
@ -438,22 +441,26 @@ function! s:show_sessions() abort
|
||||||
if exists('s:last_message')
|
if exists('s:last_message')
|
||||||
unlet s:last_message
|
unlet s:last_message
|
||||||
endif
|
endif
|
||||||
|
return
|
||||||
endif
|
endif
|
||||||
|
|
||||||
if exists('s:last_message')
|
if exists('s:last_message')
|
||||||
call s:print_section_header()
|
call s:print_section_header()
|
||||||
endif
|
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)
|
||||||
call append('$', ' ['. index .']'. repeat(' ', (3 - strlen(index))) . fnamemodify(sfiles[i], ':t'))
|
call append('$', ' ['. index .']'. repeat(' ', (3 - strlen(index))) . fnamemodify(sfiles[i], ':t'))
|
||||||
execute 'nnoremap <buffer><silent>' index ':SLoad' fnamemodify(sfiles[i], ':t') '<cr>'
|
execute 'nnoremap <buffer><silent>' index ':SLoad' fnamemodify(sfiles[i], ':t') '<cr>'
|
||||||
let s:entry_number += 1
|
let s:entry_number += 1
|
||||||
endfor
|
endfor
|
||||||
|
|
||||||
call append('$', '')
|
call append('$', '')
|
||||||
endfunction
|
endfunction
|
||||||
|
|
||||||
" Function: s:show_bookmarks {{{1
|
" Function: s:show_bookmarks {{{1
|
||||||
function! s:show_bookmarks() abort
|
function! s:show_bookmarks() abort
|
||||||
if !exists('g:startify_bookmarks')
|
if !exists('g:startify_bookmarks') || empty(g:startify_bookmarks)
|
||||||
return
|
return
|
||||||
endif
|
endif
|
||||||
|
|
||||||
|
@ -463,10 +470,8 @@ function! s:show_bookmarks() abort
|
||||||
|
|
||||||
for fname in g:startify_bookmarks
|
for fname in g:startify_bookmarks
|
||||||
let index = s:get_index_as_string(s:entry_number)
|
let index = s:get_index_as_string(s:entry_number)
|
||||||
|
|
||||||
call append('$', ' ['. index .']'. repeat(' ', (3 - strlen(index))) . fname)
|
call append('$', ' ['. index .']'. repeat(' ', (3 - strlen(index))) . fname)
|
||||||
execute 'nnoremap <buffer><silent>' index ':edit' fnameescape(fname) '<bar> call <sid>check_user_options()<cr>'
|
execute 'nnoremap <buffer><silent>' index ':edit' fnameescape(fname) '<bar> call <sid>check_user_options()<cr>'
|
||||||
|
|
||||||
let s:entry_number += 1
|
let s:entry_number += 1
|
||||||
endfor
|
endfor
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue