" define prefix dictionary let g:which_key_map = {} " use foating window let g:which_key_use_floating_win = 1 " which kley to exit let g:which_key_exit = ["\", "\"] " display names let g:which_key_display_names = {'': '↵', '': '⇆'} " -------------------------------- " menus on existing key maps " -------------------------------- " -------------- " C - settings " -------------- let g:which_key_map = { 'C' : [':tabnew ~/.vim/plugins/quickrunner.vim', 'edit C compile flags']} let g:which_key_map.g = { 'name' : 'gcc' } " ---------- " windows " ---------- "let g:which_key_map.w = { 'name' : 'windows'} " -------------- " filemanager " -------------- let g:which_key_map.v = [':EditVifm', "Vifm"] " ------------- " quickrunner " ------------- let g:which_key_map.l = { 'name' : 'language specifique'} let g:which_key_map.l.r = [ ':QuickRun -outputter loclist -input "="' , 'User input'] let g:which_key_map.l.1 = [ ':QuickRun -outputter loclist -cmdopt "text1.txt"' , 'Run with text1.txt'] let g:which_key_map.l.2 = [ ':QuickRun -outputter loclist -cmdopt "text2.txt"' , 'Run with text2.txt'] let g:which_key_map.l.3 = [ ':QuickRun -outputter loclist -cmdopt "text3.txt"' , 'Run with text3.txt'] let g:which_key_map.l.4 = [ ':QuickRun -outputter loclist -cmdopt "text4.txt"' , 'Run with text4.txt'] " -------- " saving " -------- let g:which_key_map = { ' ' : ["w" , "Write"]} " ----------- " internal " ----------- let g:which_key_map.i = { 'name' : 'internal'} let g:which_key_map.i.r = [':source ~/.vim/vimrc', 'reload source file'] let g:which_key_map.i.t = [':TagbarToggle', 'toggle tagbar'] " ------------ " debugging " ------------ "let g:which_key_map.d = { 'name' : 'debugging'} "let g:which_key_map.d.c = ['VimspectorContinue', 'continue'] "let g:which_key_map.d.s = ['VimspectorStop', 'stop'] "let g:which_key_map.d.r = ['VimspectorRestart', 'restart'] "let g:which_key_map.d.p = ['VimspectorPause', 'pause'] "let g:which_key_map.d.T = ['VimspectorToggleBreakpoint', 'toggle breakpoint'] "let g:which_key_map.d.t = ['VimspectorToggleConditionalBreakpoint', 'toggle conditional breakpoint'] "let g:which_key_map.d.a = ['VimspectorAddFunctionBreakpoint', 'add function breakpoint'] "let g:which_key_map.d.o = ['VimspectorStepOver', 'step over'] "let g:which_key_map.d.I = ['VimspectorStepInto', 'step into'] "let g:which_key_map.d.O = ['VimspectorStepOut', 'step out'] let g:which_key_map.q = [':VimspectorReset', 'quit'] " ----------- " aligning " ----------- let g:which_key_map.a = ['(EasyAlign)', 'align'] " ------ " coc " ------ " -- todolist let g:which_key_map.d = {'name' : 'todolist'} let g:which_key_map.d.l = [':CocList todolist', 'list todolist'] let g:which_key_map.d.a = [':CocCommand todolist.create', "add a task"] let g:which_key_map.d.c = [':CocCommand todolist.clear', "clear todlist"] let g:which_key_map.c = { 'name' : 'coc' } let g:which_key_map.c.g = { 'name' : 'goto'} let g:which_key_map.c.d = ['(coc-definition)', "definition"] let g:which_key_map.c.t = ['(coc-type-definition)', "type-definition"] let g:which_key_map.c.i = ['(coc-implementation)', "implementation"] let g:which_key_map.c.r = ['(coc-references)', "references"] " -- renaming let g:which_key_map.r = ['(coc-rename)', "rename"] " -- Refactor let g:which_key_map.c.R = ['(coc-refactor)', "Refactor"] " -- formatting let g:which_key_map.f = ['(coc-format)', "format code"] " -- fixing let g:which_key_map.c.f = [':CocFix', 'fix'] " -- editing let g:which_key_map.c.e = { 'name' : 'edit configs'} let g:which_key_map.c.e.s = [':CocCommand snippets.editSnippets', 'snippets'] let g:which_key_map.c.e.c = [':CocConfig', 'coc-config'] " -- terminal let g:which_key_map.t = [ ':CocCommand terminal.Toggle', "Terminal Toggle"] "let g:which_key_map.T = [ ':CocCommand terminal.Destroy', "Terminal delete"] " -- find errors let g:which_key_map.n = ['(coc-diagnostic-next)', 'goto next error'] let g:which_key_map.p = ['(coc-diagnostic-prev)', 'goto previous error'] let g:which_key_map.c.s = [ ':CocList -I symbols', "list symbols" ] " -- list let g:which_key_map.c.l = { 'name' : 'list' } let g:which_key_map.c.l.a = [':CocList diagnostics', 'diagnostics'] let g:which_key_map.c.l.e = [':CocList extensions', 'extensions'] let g:which_key_map.c.l.p = [':CocList preview', 'preview'] let g:which_key_map.c.l.o = [':CocList outline', 'outline'] let g:which_key_map.c.l.r = [':CocListResume', 'resume'] let g:which_key_map.c.l.n = [':CocNext', 'next'] let g:which_key_map.c.l.c = [':CocList commands', 'commands'] " ----- language specifique ----- let g:which_key_map.l = { 'name' : 'language specifique'} call which_key#register('', "g:which_key_map") nnoremap :WhichKey '' vnoremap :WhichKeyVisual ''