How do I open ctrlp plugin file suggestions in Insert mode? - vim-plugin

I'm using CtrlP plugin to switch to other files in Vim by pressing Ctrl-p. But this only works in normal mode. I want to trigger it by pressing the same set of keys in insert mode as well. How can I do that? I couldn't find any mapping for insert mode in the help doc.

Tried inoremap <C-p> <Esc>:CtrlP<CR> and it worked. Credit goes to #statox, who answered this question here

Related

Disable vim mode in PhpStorm in debug

Is it possible to disable vim in certain windows/modes? For instance in debugger it's a bit annoying, also when editing cell values in Database mode it's not perfect.
Another question if a tab can switch to command mode when I'm about to navigate to another tab.
Thanks
It's currently not possible in IdeaVim 0.50. There is a feature request that partially covers what you're describing: VIM-765 Option to disable plugin in dialog boxes. Feel free to vote for this feature and/or file new requests at https://youtrack.jetbrains.com/issues/VIM.
You can remap <Tab> to gt using standard Vim mapping commands. Put them into your ~/.ideavimrc.

the behavior of IntelliJ Idea Vim is something strange

I use Ctrl+k for exiting Insert mode.
So, I did the key mapping on IntelliJ.
enter image description here
it seems work well. But, something is wrong.
When I type Ctrl+k, it looks exited insert mode.
but after the input ctrl+k, next input is not recognize.
it's difficult to explain for my poor English. so please try setting Ctrl+k as a Exit Insert Mode, and check the behavior.
thank you for your help.
You should configure alternative shortcuts for the Vim emulation keys as Vim key mappings as in the original Vim. See the Vim help for :map commands. You can put those mapping into your ~/.ideavimrc.
A small example:
inoremap <C-K> <Esc>
Configuring them via "File | Settings | Keymap" is not supported.

Intellij 14 weird editor/cursor behaviour

I just upgraded my Intellij IDEA to version 14, but I have the problem that my cursor in the editor window is acting "different". It starts of in a sort of protected mode, which looks like the insert mode but it isn't, where I can't insert anything. After pressing some keys like a it changes back to normal except that sometimes it goes in a selection mode and by that I mean if I hit backspace instead of deleting the character as expected it just selects/highlights it. I find this behavior really annoying and I hope one of you can help me.
Additional Information:
Mac OS X 10.10 Yosemite Intellij 14.0
Please ask if i can provide any additional information which might be helpful.
Disabling/Uninstalling the ideaVim plugin seemed to fix the problem for me. The plugin description hints that you can configure it via a configuration script in ~/.ideavimrc, which there may also be options to get "normal" behavior with the plugin installed but I haven't looked into that though because the plugin doesn't seems all that useful to me.
Disable Vim Emulator for Intellij.
On the top menu, go to Tools > Vim Emulator
ideaVim plug in is the problem, disable that and that misbehaviour will be gone.
Mac OS X Yosemite / IntelliJ IDEA 14 CE / us keyboard layout /
If your cursor looks like this:
Go to tools:
Turn off Vim Emulator:
Cursor should go back to normal.
Settings > IDE Settings > Editor > Appearance > Disable Use block caret
This fixed the issue for me.
It seems you have entered into insert mode. I have mac and I entered some combination of keys which somehow enabled insert mode. The use block caret was not ticked for me. I found this mentioned on JetBrains thread to get out of insert mode
In short, press on mac to get back into editing mode with the normal cursor
⌥ + ⌘ + v
Go to the Keymap section of your preferences and add your keyboard shortcut to the Toggle Insert/Override command.

IdeaVIM Keybindings not working in intellij

I just upgraded IdeaVIM to use the newly added support for window management. The problem I'm having is that the keybindings aren't working at all. I've tried editing the keymap manually, adding back the default bindings, but they're not in effect.
When I hit C-w I get some help in the modeline letting me know which keybindings are available at that prefix (l for window right, h for window left etc) but when I hit the second key nothing happens!What's going on here? I'm running ideavim 13.1.3.
NOT exactly the same problem but for me
Vimidea / Vim plugin was not working on Pycharm / Rubymine / Intellij
Finally found the solution!!!
(ON MAC)
Just make sure that you don't have a conflict with the Keymap to refactor->extract->variable and vim emulator!
Go to settings->Keymap->MainMenu->Refactor->Extract->Variable
And remove the shortcut
Now run the shortcut to make the VimEmulator to run, in Mac just hit:
Cmd+option+V (option is the key next to command)
If its still doesn't work it means that you cannot exit insert mode - make sure to bind the escape key to:
settings->Keymap->Plug-ins->ideavim->Exit Insert Mode == escape
Actually using the shortcut to start/stop VimEmulator is a great idea when you ask your team-mate help with your code and he/she is not used to working with Vim.
Just hit cmd+option+V and you are back to using the idea without Vim and again to start working with Vim again :)
You can enable/disble it through: shift-cmd-A, then type ideavim and you'll see a switch on there

Intellij IdeaVim change keys

I would really like to be able to use IdeaVIM but I am unable to figure out where I can set my custom vim key mappings. For example instead of using Esc I would like to use Ctrl-C and instead of using hjkl I like to use wasd.
I have all these already set in my .vimrc but IdeaVIM failed to load them. I can copy them over manually to whatever file is needed but there is no documentation on how to do this.
As of IdeaVim 0.35 (released 2014-05-15), key mappings in ~/.ideavimrc are supported. You can put source ~/.vimrc in that file if you want to include mappings from ~/.vimrc.
Release announcement
VIM-288
(Note: This question could probably be considered a duplicate of this other StackOverflow question.)
I've done this myself, and its pretty easy in IntelliJ 11. I know that in previous versions (9, maybe?) setting up keymap values is significantly different.
In IntelliJ 11 you can do the following:
Go to Settings
Select Keymap from the left menu
Search for Exit Insert Mode on the right side and associate whatever key you want to use, such as CTRL-C
If you like to have Vim plugin installed (I find it very handy for typing) and at the same time have Ctrl+C and Ctrl+V working for copy and paste actions, do the following:
In the IntelliJ Idea, click on File > Setting. On the left pane, expand Editor and click on Vim Emulation.
Here, under the Shortcut column, find Ctrl+C and change it's Handler (under Handler column) to IDE instead of Vim.
Repeat it for Ctrl+V as well and hit Apply and Ok.
Now, you should be able to use the keyboard shortcuts for copy and paste while keeping the Vim Emulator enabled.
IntelliJ 12.1:
Go to Settings
Select Keymap from the left menu
Find Escape under the Editor Actions section and add the Ctrl-C shortcut there. ("Escape" under the "IdeaVim" section didn't work for me)
Following the same steps, but replacing "Escape" with "Exit Insert Mode" only partially worked for me. It exited insert mode correctly but ignored the following keystroke. So typing Ctrl-C,j,j would exit insert but only go up one line instead of two.