|
@@ -2,6 +2,9 @@ let g:which_key_map = {}
|
|
|
let g:which_key_sep = '→'
|
|
|
" set timeoutlen=100
|
|
|
|
|
|
+nnoremap <silent> <leader> :silent WhichKey '<Space>'<CR>
|
|
|
+vnoremap <silent> <leader> :silent <c-u> :silent WhichKeyVisual '<Space>'<CR>
|
|
|
+
|
|
|
" Not a fan of floating windows for this
|
|
|
let g:which_key_use_floating_win = 0
|
|
|
|
|
@@ -25,12 +28,10 @@ let g:which_key_map['e'] = [ ':CocCommand explorer' , 'explorer' ]
|
|
|
let g:which_key_map['f'] = [ ':Files' , 'files' ]
|
|
|
let g:which_key_map['h'] = [ '<C-W>s' , 'split below']
|
|
|
let g:which_key_map['q'] = [ 'q' , 'quit' ]
|
|
|
-let g:which_key_map['r'] = [ ':RnvimrToggle' , 'ranger' ]
|
|
|
-let g:which_key_map['s'] = [ ':Startify' , 'start screen' ]
|
|
|
+let g:which_key_map['r'] = [ ':Ranger' , 'ranger' ]
|
|
|
+let g:which_key_map['S'] = [ ':Startify' , 'start screen' ]
|
|
|
let g:which_key_map['v'] = [ '<C-W>v' , 'split right']
|
|
|
let g:which_key_map['z'] = [ 'Goyo' , 'zen' ]
|
|
|
-" nmap <leader>r :RnvimrToggle<CR>
|
|
|
-" let g:which_key_map['"'] = ['viw<esc>a"<esc>bi"<esc>lel' , 'surround']
|
|
|
|
|
|
" f is for find
|
|
|
let g:which_key_map.f = {
|
|
@@ -64,30 +65,28 @@ let g:which_key_map.f = {
|
|
|
" g is for git
|
|
|
let g:which_key_map.g = {
|
|
|
\ 'name' : '+git' ,
|
|
|
- \ '/' : [':History/' , 'history'],
|
|
|
- \ ';' : [':Commands' , 'commands'],
|
|
|
- \ 'a' : [':Ag' , 'text Ag'],
|
|
|
- \ 'b' : [':BLines' , 'current buffer'],
|
|
|
- \ 'B' : [':Buffers' , 'open buffers'],
|
|
|
- \ 'c' : [':Commits' , 'commits'],
|
|
|
- \ 'C' : [':BCommits' , 'buffer commits'],
|
|
|
- \ 'f' : [':Files' , 'files'],
|
|
|
- \ 'g' : [':GFiles' , 'git files'],
|
|
|
- \ 'G' : [':GFiles?' , 'modified git files'],
|
|
|
- \ 'h' : [':History' , 'file history'],
|
|
|
- \ 'H' : [':History:' , 'command history'],
|
|
|
- \ 'l' : [':Lines' , 'lines'] ,
|
|
|
- \ 'm' : [':Marks' , 'marks'] ,
|
|
|
- \ 'M' : [':Maps' , 'normal maps'] ,
|
|
|
- \ 'p' : [':Helptags' , 'help tags'] ,
|
|
|
- \ 'r' : [':Rg' , 'text Rg'],
|
|
|
- \ 's' : [':Snippets' , 'snippets'],
|
|
|
- \ 'S' : [':Colors' , 'color schemes'],
|
|
|
- \ 't' : [':Tags' , 'project tags'],
|
|
|
- \ 'T' : [':BTags' , 'buffer tags'],
|
|
|
- \ 'w' : [':Windows' , 'search windows'],
|
|
|
- \ 'y' : [':Filetypes' , 'file types'],
|
|
|
- \ 'z' : [':FZF' , 'FZF'],
|
|
|
+ \ 'a' : [':Git add .' , 'add all'],
|
|
|
+ \ 'A' : [':Git add %' , 'add current'],
|
|
|
+ \ 'b' : [':Git blame' , 'blame'],
|
|
|
+ \ 'B' : [':GBrowse' , 'browse'],
|
|
|
+ \ 'c' : [':Git commit -m "autocommit"' , 'commit'],
|
|
|
+ \ 'd' : [':Git diff' , 'diff'],
|
|
|
+ \ 'D' : [':Gdiffsplit' , 'diff split'],
|
|
|
+ \ 'g' : [':GGrep' , 'git grep'],
|
|
|
+ \ 'G' : [':Gstatus' , 'status'],
|
|
|
+ \ 'h' : [':GitGutterLineHighlightsToggle' , 'highlight hunks'],
|
|
|
+ \ 'H' : ['<Plug>(GitGutterPreviewHunk)' , 'preview hunk'],
|
|
|
+ \ 'j' : ['<Plug>(GitGutterNextHunk)' , 'next hunk'],
|
|
|
+ \ 'k' : ['<Plug>(GitGutterPrevHunk)' , 'prev hunk'],
|
|
|
+ \ 'l' : [':Git log' , 'log'],
|
|
|
+ \ 'p' : [':Git push' , 'push'],
|
|
|
+ \ 'P' : [':Git pull' , 'pull'],
|
|
|
+ \ 'r' : [':GRemove' , 'remove'],
|
|
|
+ \ 's' : ['<Plug>(GitGutterStageHunk)' , 'stage hunk'],
|
|
|
+ \ 't' : [':GitGutterSignsToggle' , 'toggle signs'],
|
|
|
+ \ 'u' : ['<Plug>(GitGutterUndoHunk)' , 'undo hunk'],
|
|
|
+ \ 'v' : [':GV' , 'view commits'],
|
|
|
+ \ 'V' : [':GV!' , 'view buffer commits'],
|
|
|
\ }
|
|
|
|
|
|
" l is for language server protocol
|
|
@@ -142,7 +141,5 @@ let g:which_key_map.t = {
|
|
|
\ }
|
|
|
|
|
|
call which_key#register('<Space>', "g:which_key_map")
|
|
|
-nnoremap <silent> <leader> :silent <c-u>WhichKey '<Space>'<CR>
|
|
|
-vnoremap <silent> <leader> :silent <c-u>WhichKeyVisual '<Space>'<CR>
|
|
|
|
|
|
|