add bookmarks

This commit is contained in:
Marco Hinz 2013-04-24 10:42:35 +02:00
parent ee344d3be3
commit 05cc44f7f9
3 changed files with 27 additions and 0 deletions

View file

@ -58,6 +58,19 @@ function! s:start() abort
call append('$', ' ['. idx .']'. repeat(' ', 3 - strlen(string(idx))) . fnamemodify(sfiles[i], ':t:r'))
execute 'nnoremap <buffer> '. idx .' :source '. sfiles[i] .'<cr>'
endfor
let cnt = idx
endif
if exists('g:startify_bookmarks')
call append('$', '')
for fname in g:startify_bookmarks
if !filereadable(expand(fname))
continue
endif
let cnt += 1
call append('$', ' ['. cnt .']'. repeat(' ', 3 - strlen(string(cnt))) . fname)
execute 'nnoremap <buffer> '. cnt .' :edit '. fname .'<cr>'
endfor
endif
call append('$', ['', ' [q] quit'])