diff options
| author | Chris <[email protected]> | 2020-05-10 23:27:51 -0400 | 
|---|---|---|
| committer | Chris <[email protected]> | 2020-05-10 23:28:32 -0400 | 
| commit | 48e0bde090d18c797b2542fcc4a3b0cbdd524795 (patch) | |
| tree | 8e4b758c588211b2dda3678d2d3e466dbc95c76d /keys | |
| parent | bdad0adcab896789779fae5551a08f1d356f2ec5 (diff) | |
which key is stable
Diffstat (limited to 'keys')
| -rw-r--r-- | keys/which-key.vim | 57 | 
1 files changed, 27 insertions, 30 deletions
| diff --git a/keys/which-key.vim b/keys/which-key.vim index 4a2d47ef..0c84750f 100644 --- a/keys/which-key.vim +++ b/keys/which-key.vim @@ -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> | 
