Tuesday, March 5, 2013

Re: ctrlP to navigate arbitrary directory

On Tue, 5 Mar 2013, Fabien Meghazi wrote:

> On Tue, Mar 5, 2013 at 4:07 PM, Benjamin R. Haskell wrote:
>> Yes. Here's what you're asking for (put it in your .vimrc):
>>
>> let g:ctrlp_prompt_mappings = {
>> \ 'AcceptSelection("t")': ['<cr>'],
>> \ }
>
> I tried it without success. I tried it before and after
> pathogen#infect, also tried to enter the command manually but the
> files still open in current window.

I forgot you also need to remove the '<cr>' binding from
'AcceptSelection("e")' (a default). You can either map something else
to it (e.g. Ctrl-X):

let g:ctrlp_prompt_mappings = {
\ 'AcceptSelection("t")': ['<cr>'],
\ 'AcceptSelection("e")': ['<c-x>'],
\ }

Or just remove it:

let g:ctrlp_prompt_mappings = {
\ 'AcceptSelection("t")': ['<cr>'],
\ 'AcceptSelection("e")': [],
\ }

--
Best,
Ben

--
--
You received this message from the "vim_use" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php

---
You received this message because you are subscribed to the Google Groups "vim_use" group.
To unsubscribe from this group and stop receiving emails from it, send an email to vim_use+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.

No comments: