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

Support cusom mapping #5

Open
torgeir opened this issue Jul 17, 2014 · 3 comments
Open

Support cusom mapping #5

torgeir opened this issue Jul 17, 2014 · 3 comments

Comments

@torgeir
Copy link

torgeir commented Jul 17, 2014

So I was trying to follow up on one of your todos, by adding support for custom mappings instead of <c-@>.

  if !exists("g:ctrlp_bdelete_map")
    let g:ctrlp_bdelete_map = "<c-@>"
  end

  execute "nnoremap <buffer> <silent> ".g:ctrlp_bdelete_map." :call <sid>DeleteMarkedBuffers()<cr>"

Which ought to work, but seemingly no other combinations than <c-@> is coming through?

I'm suspecting ctrlp is doing something that might prevent other keys from working, maybe @kien knows whats going on here

@d11wtq
Copy link
Owner

d11wtq commented Jul 22, 2014

I think ctrlp just doesn't let you re-bind keys that are already bound by ctrlp itself. In reality, there are barely any mappings left to use. If you figure something out, let me know :)

I'm actually beginning to consider forking ctrlp, as it appears to either have been abandoned, or something has happened to @kien (I really hope not).

@johgh
Copy link

johgh commented Feb 22, 2015

These mappings are left to use: (according to http://tnerual.eriogerg.free.fr/vimqrc.html)
^@ ^K ^_ \ Fn ^Fn

I tested with ^_ and it worked, since ^@ doesn't work for me (something else is triggering)

@jandamm
Copy link

jandamm commented Jun 26, 2020

For posterity:
This plugin applies its mapping before ctrlp applies its own mappings.
So you either have to make sure your key is not in g:ctrlp_prompt_mappings or replace the mapping.
I have changed the key to <C-x> so I added let g:ctrlp_prompt_mappings = { 'AcceptSelection("h")': ['<c-cr>', '<c-s>'] } to my vimrc. (The default for AcceptSelection("h") includes <C-x>).

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

4 participants