hecal3 / vim-leader-guide

295 stars 21 forks source link

Mapping to <Space> not working #20

Closed metakirby5 closed 8 years ago

metakirby5 commented 8 years ago

Minimal .vimrc to reproduce the problem, assuming vim-plug is installed:

call plug#begin('~/.vim/plugins')
  Plug 'hecal3/vim-leader-guide'
call plug#end()

let g:lgmap = {}
call leaderGuide#register_prefix_descriptions('', 'g:lgmap')
nnoremap <silent> [ :<c-u>LeaderGuide '['<CR>
vnoremap <silent> [ :<c-u>LeaderGuideVisual '['<CR>

noremap [x <Space>

Steps to reproduce problem:

  1. Run vim
  2. Quickly type [x and observe that nothing happens, as expected
  3. Type [ and wait for the leader guide to show up
  4. Type x and observe that the buffer is now filled with [ce>

I think I know how to fix the issue, so I'll issue a PR shortly.