Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

let g:which_key_centered = 1 doesn't make the keybind list centered #198

Open
etorth opened this issue Jul 21, 2021 · 1 comment
Open

let g:which_key_centered = 1 doesn't make the keybind list centered #198

etorth opened this issue Jul 21, 2021 · 1 comment

Comments

@etorth
Copy link

etorth commented Jul 21, 2021

init.vim code:

let g:which_key_centered = 1    
let g:which_key_vertical = 1    
let g:which_key_map = {}    
let g:which_key_map['LeaderF'] = {    
            \ 'name': '+LeaderF',    
            \ 'f' : ['<cmd>Leaderf file\<cr>',                'current-directory'],    
            \ 'g' : ['<cmd>call SearchGitRepo()\<cr>',        'git-repository'],    
            \ 'p' : ['<cmd>call SearchP4Client()\<cr>',       'perforce-client'],    
            \ 'c' : ['<cmd>call SearchCmakeSourceDir()\<cr>', 'cmake-source'],    
            \ }    
nnoremap <C-P> <cmd>WhichKey! g:which_key_map['LeaderF']<cr>    

this shows like:
https://raw.githubusercontent.com/etorth/imghost/e161a89cd164f2e4400baa1f36c1ab923630961c/2021.07.21.13.06.12.730695200.png
the keybind is not centered, as you see

@BrotifyPacha
Copy link
Collaborator

I suppose the problem is g:which_key_vertical=1 . I was able to achieve the result you wanted by setting it to 0.
image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants