vim-ctrlp-cmdpalette
vim-ctrlp-cmdpalette copied to clipboard
Hit <CR> once to execute?
Hi, thank you for a really good plugin. I didn't think I needed it till I used it. Now it's almost indispensable.
I had a quick question about the behavior. When I execute :CtrlPCmdPalette<CR>, I type in my command and then I have to press <CR> twice to execute the command. This is a little different from opening files etc. where only a single <CR> is required. Is this behavior defined by this plugin or CtrlP itself?
Also, I understand that sometimes you wouldn't want to execute the command directly but maybe pass in some arguments etc. thus it makes sense to just put it on the command-line after pressing <CR>. However, is there a way I can define these mappings such that pressing <Tab> in the CtrlP window puts it on the command-line while pressing <CR> executes it?
Sadly, CtrlP's extension API doesn't allow too much customization for the "choosing" of results. It only allows 4 modes of choosing, with <cr>, <c-t>, <c-v> or <c-x>, and each one has a special meaning.
That's why I used double <cr> to just prepend and expect for extra arguments, as both seemed easier than something like control+key for one of the cases and
Ah, that sucks.
However, if you don't mind, could you elaborate on what exactly you'd need so that I can request the same here. This is supposed to be a fork that is active in accepting pull requests.
If possible, it would be nice to be able to "accept" the selected result with other extension-defined keys (defined by each extension separatedly). Example: an extension could be able to use TAB and CR as a keys to accept the selected result, with different behaviour for each key.