0
votes

I am using GVim 7.4 and I would like to do some really simple mapping to use CtrlP fuzzy matching of tags when a key combination is used.

I tried 2 approaches and they all seem to fail when vim calls Control + [x] combination. While I do understand that there are restrictions when it comes to mapping Ctrl+[x] codes, I haven't found any information on why ctrl mapping wouldn't work.

noremap \t :CtrlPTag<CR><C-\>w

This one enters CtrlP tag mode but then it doesn't enter word from under the cursor.

noremap \t <C-p><C-\>w

Here we don't even get to CtrlP window (I even omit going into tag mode here for simplicity).

1

1 Answers

0
votes

As far as I understand (I'm no CtrlP user), the plugin is triggered via some command / key combination, and then presents interactive selection and filtering. It even has different "source" modes.

Now, this is a pretty heavy integration into Vim, probably using scratch buffers and its own input loop. That's why you cannot simply append keys to the mapping and get them interpreted by the plugin "as typed".

Typically, these plugins offer mode selection and so on via (optional) command arguments. Check the plugin's help, and if you cannot get the plugin into the state you need, best contact the plugin's author and ask for such enhancement.