Skip to content

Commit

Permalink
Add a note about some raw commands may not work
Browse files Browse the repository at this point in the history
Wrap them using a Command or function then.

Close #126
Close #133
  • Loading branch information
liuchengxu committed Jul 18, 2020
1 parent b940914 commit 4e5bd49
Showing 1 changed file with 10 additions and 3 deletions.
13 changes: 10 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -145,9 +145,9 @@ let g:which_key_map['w'] = {
\ 'l' : ['<C-W>l' , 'window-right'] ,
\ 'k' : ['<C-W>k' , 'window-up'] ,
\ 'H' : ['<C-W>5<' , 'expand-window-left'] ,
\ 'J' : ['resize +5' , 'expand-window-below'] ,
\ 'J' : [':resize +5' , 'expand-window-below'] ,
\ 'L' : ['<C-W>5>' , 'expand-window-right'] ,
\ 'K' : ['resize -5' , 'expand-window-up'] ,
\ 'K' : [':resize -5' , 'expand-window-up'] ,
\ '=' : ['<C-W>=' , 'balance-window'] ,
\ 's' : ['<C-W>s' , 'split-window-below'] ,
\ 'v' : ['<C-W>v' , 'split-window-below'] ,
Expand Down Expand Up @@ -219,7 +219,14 @@ let g:which_key_map.o = {
" =======================================================
" Create menus not based on existing mappings:
" =======================================================
" Provide commands(ex-command, <Plug>/<C-W>/<C-d> mapping, etc.) and descriptions for existing mappings
" Provide commands(ex-command, <Plug>/<C-W>/<C-d> 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'] ,
Expand Down

0 comments on commit 4e5bd49

Please sign in to comment.