-
-
Notifications
You must be signed in to change notification settings - Fork 64
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
Allow providing a descriptive text to the existing mapping without registering its rhs explicitly #2
Comments
That's possible, I'll find some time to take a closer look. |
Hello @liuchengxu thanks for this plugin! I'd like to also vote for this issue i.e allow to just add a description for the vim leader mappings to be shown on the menu without the need to redefine them. Thanks! |
Please try this branch, which should support only register a description to an existing mapping. Any feedback is welcome. |
Hello @liuchengxu , I tried the new branch and it seems to be working fine in gvim! However, when I tried it in (command line) vim, after I press space and a key I see the following error: I am not sure if it related, I've commented out my bufleave autocmd but I still get it. Also notice I am using windows. |
I need a minimal vimrc to reproduce. |
Hello @liuchengxu here's a minimal vimrc that throws the error: " Basic settings ---------------------- {{{
set nocompatible " Important
filetype plugin indent on " Enable ft
let mapleader = "\<Space>"
set timeout
set timeoutlen=500
" Toggle spelling
nnoremap <leader>sp :set spell!<CR>
" Reverse lines without changing unnamed register
nnoremap <Leader>sd "udd"up
" Clear search nightlight
nnoremap <Leader>sc :noh<CR>
" }}}
" Plugins --------------------- {{{
call plug#begin('~/vimfiles/plugged')
Plug 'liuchengxu/vim-which-key', { 'branch': 'allow-provide-description-only' }
call plug#end()
" }}}
" Other Plugin configuration ------------------ {{{
nnoremap <silent> <leader> :WhichKey '<Space>'<CR>
let g:which_key_map = {}
let g:which_key_map.s = { 'name' : '+TEST' }
let g:which_key_map.s.p = 'Toggle spell'
let g:which_key_map.s.d = 'Change lines'
let g:which_key_map.s.c = 'Clear highlight'
call which_key#register('<Space>', "g:which_key_map")
" }}} Please keep in mind that this error is only thrown in the command line vim, not in gvim and in Windows (I haven't tested in Linux). |
@spapas This miminal vimrc seemingly works well on my mac, both terminal vim and macvim. I will try to reproduce on Windows later when I get one. |
Thanks @liuchengxu. Please notice that I also tested the main branch and it throws the same error when used with command line vim in windows. So it's not related to this branch but is a general error. Should I open a new issue for that ? |
@spapas Feel free to file another issue. |
暂时没有试出问题 |
如上,dict的value,list变量的第一个元素,是指定快捷键的实现,这样就给配置带来了极大不方便。
如果能做到下面这种,自然是非常好:
理由是,有的快捷键,后面是一大串
The text was updated successfully, but these errors were encountered: