Browse Source

Custom indices overwrite plugin mappings

References #178.
Marco Hinz 10 years ago
parent
commit
61c1e360c8
1 changed files with 5 additions and 5 deletions
  1. 5 5
      autoload/startify.vim

+ 5 - 5
autoload/startify.vim

@@ -593,11 +593,6 @@ endfunction
 
 " Function: s:set_mappings {{{1
 function! s:set_mappings() abort
-  for k in keys(s:entries)
-    execute 'nnoremap <buffer><nowait><silent>' s:entries[k].index
-          \ ':call startify#open_buffers('. string(k) .')<cr>'
-  endfor
-
   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>
@@ -607,6 +602,11 @@ function! s:set_mappings() abort
   nnoremap <buffer><nowait><silent> <cr>          :call startify#open_buffers()<cr>
   nnoremap <buffer><nowait><silent> <2-LeftMouse> :call startify#open_buffers()<cr>
 
+  for k in keys(s:entries)
+    execute 'nnoremap <buffer><nowait><silent>' s:entries[k].index
+          \ ':call startify#open_buffers('. string(k) .')<cr>'
+  endfor
+
   " Prevent 'nnoremap j gj' mappings, since they would break navigation.
   " (One can't leave the [x].)
   if !empty(maparg('j', 'n'))