From dd93afedb6744ec9f270847e39cd1250f7489640 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Emmanuel=20Beno=C3=AEt?= Date: Tue, 18 May 2021 15:49:52 +0200 Subject: [PATCH] Changed test shortcuts Use leader-based sequences, document the fuck out of them --- bundles-init/vim-test.cfg.vim | 8 ++++---- bundles-init/vim-which-key.cfg.vim | 8 ++++++++ cfg/90-quickfix-toggle.vim | 1 + 3 files changed, 13 insertions(+), 4 deletions(-) diff --git a/bundles-init/vim-test.cfg.vim b/bundles-init/vim-test.cfg.vim index 157da62..933be8a 100644 --- a/bundles-init/vim-test.cfg.vim +++ b/bundles-init/vim-test.cfg.vim @@ -2,7 +2,7 @@ let test#strategy = 'asyncrun_background' " Shortcuts -nmap :TestSuite -nmap :TestFile -nmap :TestNearest -nmap :TestLast +nmap Ta :TestSuite +nmap Tf :TestFile +nmap Tc :TestNearest +nmap TT :TestLast diff --git a/bundles-init/vim-which-key.cfg.vim b/bundles-init/vim-which-key.cfg.vim index 3ad595b..bae906c 100644 --- a/bundles-init/vim-which-key.cfg.vim +++ b/bundles-init/vim-which-key.cfg.vim @@ -8,6 +8,7 @@ let g:which_key_fallback_to_native_key = 1 let g:which_key_map[' '] = [ 'call feedkeys(":nohlsearch\n")' , 'clear-search' ] let g:which_key_map.e = 'file-explorer' let g:which_key_map.u = 'undo-tree' +let g:which_key_map.q = 'toggle-quickfix' " Options let g:which_key_map.o = { 'name' : '+options' } @@ -78,3 +79,10 @@ let g:which_key_map.t.z = 'terminal-top' let g:which_key_map.t.q = 'terminal-left' let g:which_key_map.t.s = 'terminal-bottom' let g:which_key_map.t.d = 'terminal-right' + +" Tests +let g:which_key_map.T = { 'name' : '+tests' } +let g:which_key_map.T.a = 'run-all' +let g:which_key_map.T.f = 'run-file' +let g:which_key_map.T.c = 'run-nearest' +let g:which_key_map.T.T = 'run-previous' diff --git a/cfg/90-quickfix-toggle.vim b/cfg/90-quickfix-toggle.vim index 3a4b15b..87bbd72 100644 --- a/cfg/90-quickfix-toggle.vim +++ b/cfg/90-quickfix-toggle.vim @@ -40,3 +40,4 @@ function! ToggleQuickfix(size, ...) endfunc nmap :call ToggleQuickfix(0) +nmap q :call ToggleQuickfix(0)