Skip to content

Commit

Permalink
Update README.md (#249)
Browse files Browse the repository at this point in the history
added instructions on registering which-key dictionary
  • Loading branch information
yatesco authored Dec 16, 2023
1 parent 08cf520 commit a03cb50
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -135,9 +135,10 @@ If no description dictionary is available, the right-hand-side of all mappings w

<p align="center"><img width="800px" src="https://raw.githubusercontent.com/liuchengxu/img/master/vim-which-key/raw-spc-w.png"></p>

The dictionary configuration is necessary to provide group names or a description text.
The dictionary configuration is necessary to provide group names or a description text:

```vim
let g:which_key_map = {}
let g:which_key_map['w'] = {
\ 'name' : '+windows' ,
\ 'w' : ['<C-W>w' , 'other-window'] ,
Expand All @@ -158,6 +159,7 @@ let g:which_key_map['w'] = {
\ 'v' : ['<C-W>v' , 'split-window-below'] ,
\ '?' : ['Windows' , 'fzf-window'] ,
\ }
call which_key#register('<Space>', "g:which_key_map")
```

<p align="center"><img width="800px" src="https://raw.githubusercontent.com/liuchengxu/img/master/vim-which-key/spc-w.png"></p>
Expand Down

0 comments on commit a03cb50

Please sign in to comment.