Selaa lähdekoodia

Expose startify#set_mark()

This function can be used to remap the functionality that is mapped to the
b/s/v/t keys by default.

References https://github.com/mhinz/vim-startify/issues/390
Marco Hinz 6 vuotta sitten
vanhempi
sitoutus
9814df57c1
1 muutettua tiedostoa jossa 6 lisäystä ja 6 poistoa
  1. 6 6
      autoload/startify.vim

+ 6 - 6
autoload/startify.vim

@@ -827,10 +827,10 @@ endfunction
 function! s:set_mappings() abort
   nnoremap <buffer><nowait><silent> i             :enew <bar> startinsert<cr>
   nnoremap <buffer><nowait><silent> <insert>      :enew <bar> startinsert<cr>
-  nnoremap <buffer><nowait><silent> b             :call <sid>set_mark('B')<cr>
-  nnoremap <buffer><nowait><silent> s             :call <sid>set_mark('S')<cr>
-  nnoremap <buffer><nowait><silent> t             :call <sid>set_mark('T')<cr>
-  nnoremap <buffer><nowait><silent> v             :call <sid>set_mark('V')<cr>
+  nnoremap <buffer><nowait><silent> b             :call startify#set_mark('B')<cr>
+  nnoremap <buffer><nowait><silent> s             :call startify#set_mark('S')<cr>
+  nnoremap <buffer><nowait><silent> t             :call startify#set_mark('T')<cr>
+  nnoremap <buffer><nowait><silent> v             :call startify#set_mark('V')<cr>
   nnoremap <buffer><nowait><silent> B             :call startify#set_batchmode('B')<cr>
   nnoremap <buffer><nowait><silent> S             :call startify#set_batchmode('S')<cr>
   nnoremap <buffer><nowait><silent> T             :call startify#set_batchmode('T')<cr>
@@ -868,8 +868,8 @@ function! startify#set_batchmode(batchmode) abort
   echo empty(s:batchmode) ? 'Batchmode off' : 'Batchmode: '. s:batchmode
 endfunction
 
-" Function: s:set_mark {{{1
-function! s:set_mark(type, ...) abort
+" Function: #set_mark {{{1
+function! startify#set_mark(type, ...) abort
   if a:0
     let entryline = a:1
   else