Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How can I use registers in CtrlP?

Tags:

vim

ctrlp

I want to use vim registers in CtrlP input form, like <C-r>".

<C-r> is used by ToggleRegex() by default. So I configure CtrlP with g:ctrlp_prompt_mappings. like that,

let g:ctrlp_prompt_mappings = {
\ 'ToggleRegex()': ['<C-g>'],
\}

Then it seems to make effect, but error occur with pressing <C-r>.

E21: Cannot make changes, 'modifiable' is off

How can I do that?

like image 778
zeero Avatar asked Mar 21 '23 17:03

zeero


1 Answers

it looks like you need <c-\> it opens a console dialog to paste <cword>, <cfile>, the content of the search register, the last visual selection, the clipboard or any register into the prompt.

like image 102
shemerey Avatar answered Apr 21 '23 04:04

shemerey