How to debug change in key binding / command behavior (<c-p> / ctrl-p for ctrlp.vim vim plugin)?

192 views Asked by At

I'm using the vim ctrlp plugin, and the <c-p> (Ctrl+p) key binding / command (which invokes :CtrlP) often goes back to the vim default of moving the cursor up a line. I can't figure out why this is happening. How can I debug this?

(I've been using the vim ctrlp plugin (https://github.com/ctrlpvim) for 5+ years, and this just started happening in the last month. I've updated the bundle to the latest code from 25 May 2020.)

I thought maybe the mapping was getting lost, but before and after this behavior, the mappings are the same:

:filter /ctrlp/ map
   <C-P>         <Plug>(ctrlp)
n  <Plug>(ctrlp) * :<C-U>CtrlP<CR>

And when it happens, I can still use :CtrlP to get the same functionality as the <c-p> / Ctrl+p command that is no longer working. If I exit vim and start vim again, it works again.

Workarounds:

  • use :CtrlP

  • use Shift+Ctrl+p

  • restart vim

     $ vim --version
     VIM - Vi IMproved 8.2 (2019 Dec 12, compiled Aug 20 2020 22:44:15)
    

Update (31 Aug 2020):

It looks like this might be either a vim issue or an iTerm2 issue: https://github.com/vim/vim/issues/6794

1

There are 1 answers

0
Rob Bednark On BEST ANSWER

This was due to an iTerm2 issue. I'm gone from iTerm2 Build 3.4.0beta4 to Build 3.4.0beta10 and have not been seeing the issue anymore.

See also this related vim issue.