From 4e5bd491badecfcd3ecbe0f813d3b31625a8eb4f Mon Sep 17 00:00:00 2001 From: Liu-Cheng Xu Date: Sat, 18 Jul 2020 12:52:37 +0800 Subject: [PATCH] Add a note about some raw commands may not work Wrap them using a Command or function then. Close #126 Close #133 --- README.md | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index bbd4419..4fec457 100644 --- a/README.md +++ b/README.md @@ -145,9 +145,9 @@ let g:which_key_map['w'] = { \ 'l' : ['l' , 'window-right'] , \ 'k' : ['k' , 'window-up'] , \ 'H' : ['5<' , 'expand-window-left'] , - \ 'J' : ['resize +5' , 'expand-window-below'] , + \ 'J' : [':resize +5' , 'expand-window-below'] , \ 'L' : ['5>' , 'expand-window-right'] , - \ 'K' : ['resize -5' , 'expand-window-up'] , + \ 'K' : [':resize -5' , 'expand-window-up'] , \ '=' : ['=' , 'balance-window'] , \ 's' : ['s' , 'split-window-below'] , \ 'v' : ['v' , 'split-window-below'] , @@ -219,7 +219,14 @@ let g:which_key_map.o = { " ======================================================= " Create menus not based on existing mappings: " ======================================================= -" Provide commands(ex-command, // mapping, etc.) and descriptions for existing mappings +" Provide commands(ex-command, // mapping, etc.) +" and descriptions for the existing mappings. +" +" Note: +" Some complicated ex-cmd may not work as expected since they'll be +" feed into `feedkeys()`, in which case you have to define a decicated +" Command or function wrapper to make it work with vim-which-key. +" Ref issue #126, #133 etc. let g:which_key_map.b = { \ 'name' : '+buffer' , \ '1' : ['b1' , 'buffer 1'] ,