liuchengxu/vim-which-key

lightline的高亮被破坏了.

finviman opened this issue · 2 comments

Environment (please complete the following information):

  • OS: MacOS 10.14.6
  • (Neo)Vim version: 0.4.2
  • vim-which-key version: 4b70b44
  • Have you reproduced with a minimal vimrc: yes

Describe the bug
目前非常依赖这个插件,我几乎把所有操作都整合进来了.目前有两个问题,自己无力解决.求助.

  1. 跟之前一个网友报的airline问题差不多, 那个问题已经fix. 我这次是lightline. 而且不止高亮, 显示内容都变了. 另外我试验了airline,确实这个问题不存在了,不过airline启动速度太慢, 还是得看看lightline的问题.
    before

iShot2020-04-3018 22 31

after

iShot2020-04-3018 22 47

  1. 我的窗口配置,是README主页上抄的,其中 resize -5 这个命令不生效, 我发现所有有空格的命令都不生效,不知道为什么.

To Reproduce
Steps to reproduce the behavior:

  1. Create the minimal vimrc min.vim:
call plug#begin()

Plug 'liuchengxu/vim-which-key'
Plug 'itchyny/lightline.vim'

call plug#end()

set updatetime=200
let g:mapleader = "\<Space>"
let g:maplocalleader = ','
nnoremap <silent> <leader>      :<c-u>WhichKey '<Space>'<CR>
nnoremap <silent> <localleader> :<c-u>WhichKey  ','<CR>
call which_key#register('<Space>', "g:which_key_map")
set timeoutlen=50
let g:which_key_use_floating_win=0
let g:which_key_map =  {}

let g:which_key_map.w = {
      \ 'name' : '+windows' ,
      \ 'H' : ['<C-W>8<'    , 'expand-window-left']    ,
      \ 'J' : ['resize +5'  , 'expand-window-below']   ,
      \ 'L' : ['<C-W>8>'    , 'expand-window-right']   ,
      \ 'K' : ['resize -5'  , 'expand-window-up']      ,
      \ }

set termguicolors
  1. Start (neo)vim with command: vim -u min.vim

  2. Type ''

  3. See error

Expected behavior
A clear and concise description of what you expected to happen.

Screenshots
If applicable, add screenshots to help explain your problem.

Additional context
Add any other context about the problem here.

自答一部分,我翻看issue, 这么写 \ 'K' : ['resize -5' , 'expand-window-up'] ,不行, 得写成'K' : [':resize -5' , 'expand-window-up'] 才行, 这很重要啊, 这样很多空格有参数等命令都好用了. README里是不是错了?

新版验证问题解决了,thx