Browse Source

Improve mappings

This sets all the created mappings as `nowait`, meaning having global
mappings will still allow you to jump to a file instantly.

For example, if you have a commentary plugin and define a global mapping
of `gcc`, you can't use `g` without waiting (or clicking Esc right
away).

Closes #180.
somini 10 years ago
parent
commit
97b4e225be
1 changed files with 9 additions and 9 deletions
  1. 9 9
      autoload/startify.vim

+ 9 - 9
autoload/startify.vim

@@ -594,18 +594,18 @@ endfunction
 " Function: s:set_mappings {{{1
 function! s:set_mappings() abort
   for k in keys(s:entries)
-    execute 'nnoremap <buffer><silent>' s:entries[k].index
+    execute 'nnoremap <buffer><nowait><silent>' s:entries[k].index
           \ ':call startify#open_buffers('. string(k) .')<cr>'
   endfor
 
-  nnoremap <buffer><silent> i             :enew <bar> startinsert<cr>
-  nnoremap <buffer><silent> <insert>      :enew <bar> startinsert<cr>
-  nnoremap <buffer><silent> b             :call <sid>set_mark('B')<cr>
-  nnoremap <buffer><silent> s             :call <sid>set_mark('S')<cr>
-  nnoremap <buffer><silent> t             :call <sid>set_mark('T')<cr>
-  nnoremap <buffer><silent> v             :call <sid>set_mark('V')<cr>
-  nnoremap <buffer><silent> <cr>          :call startify#open_buffers()<cr>
-  nnoremap <buffer><silent> <2-LeftMouse> :call startify#open_buffers()<cr>
+  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> <cr>          :call startify#open_buffers()<cr>
+  nnoremap <buffer><nowait><silent> <2-LeftMouse> :call startify#open_buffers()<cr>
 
   " Prevent 'nnoremap j gj' mappings, since they would break navigation.
   " (One can't leave the [x].)