How to display current mode IdeaVIM is in? - statusbar

I would like to see which Vim mode I am currently in while using IdeaVIM in PyCharm, or any other JetBrains IDE.
It happens that I select a single character with the mouse (e.g. accidental double-click on a single letter) and the cursor then doesn't distinguish properly between normal mode and visual mode, which makes for awkward situations after hitting a few keys.
Is there a way to display the current mode at all times in the status bar or somewhere else that I have missed?

Put set showmode into your ~/.ideavimrc or vote for https://youtrack.jetbrains.com/issue/VIM-943.

Related

How to keep IntelliSense Complete Word option off?

IntelliSense has a mode where if you hit the spacebar, it will automatically type out the suggested auto-complete word. In order to prevent this from happening, you can hit the Escape key before pressing Space. This will close the autocomplete popup, so that the suggested word is not automatically typed.
I prefer the alternative setting, where I actually have to hit the Enter key to accept the suggested autocompletion. If I just type Space, I want a space to follow the characters that I actually typed.
I know that I can toggle between the undesired mode and the second mode I describe, which I do want. To do this, I click Edit -> IntelliSence -> Toggle Completion Mode.
My problem is that this setting never sticks. It constantly reverts to the wrong mode. I'm not sure exactly when it's changing, but it seems to revert back several times a day. If I change this for one Solution, it won't apply to my other Solutions. Even if I apply it to a solution, close VS, reopen, and start working again, it will have reverted.
Does this happen to everyone else, or is this unique to me? Is there some global setting that forces this feature to stay off always? Do I have a corrupted file somewhere that's causing this?
No, this is normal behavior and this setting behaves like what you described in the previous VS versions.
However, thanks to those members who is reporting this issue and Microsoft has fixed this behavior in the latest VS2019 version.
Since VS2015 is not supported by Microsoft so far, so this behavior cannot be fixed on VS2015 and I suggest you could install the latest VS2019 Community and get what you want.
Once you click the Toggle Completion Mode under Edit-->Intellisense, no matter you close VS, create a new project or a solution, use other c# file editor, it will never revert back.

How does the JetBrains IdeaVIM plugin indicate Insertion and Normal mode?

In ordinary vim, the lower left shows NORMAL and INSERT as I switch between those two modes.
How do I see the mode in IdeaVIM?
(I am using GoLand but it is the same in IntelliJ, PyCharm, etc.)
I tried switching back and forth between Normal and Insert mode, but cannot find any indication.
You should add set showmode to your ~/.ideavimrc.
More options can be found here: https://github.com/JetBrains/ideavim/wiki/%22set%22-commands

Intellij Idea: what is shortcut for main window

Imaging the situation when you writing some code and then you wish to continue your work in the terminal. Alt + F12 and you are in the terminal. After 1 sec you wish to continue to work under your code. So you need some shortcut that allows you return back to the code window (I would like to avoid using the mouse). What should I press for this case?
Terminal has an option to override IDE shortcuts which is enabled by default, this is done so that you can use common shortcuts in the terminal applications.
If you disable this option, you can use Esc to get the focus back to the editor, otherwise it will be intercepted and can be used in the apps running in the terminal tool window.
Shift+Esc will hide the Terminal tool window and move the focus back to the editor no matter if the option mentioned above is enabled or not.
For all the other cases Esc will work fine as mentioned in my other answer.

Is there a way to make IdeaVim understand all kinds of selection?

When I use, e.g. refactoring or Ctrl+Shift+arrow shortcut to select a text, I can't delete it with d as if I did it via select mode. It gets especially annoying when the plugin doesn't recognize automatic selection on refactoring. How do I fix or work around it?
I think this is depended on the ideavim impl. I am using ideavim as well, however, I don't use those arrow keys. I tested what you said, it can be reproduced here.
It seems that the c-s-arrows selection won't let ideavim switch to VISUAL mode, thus, the later actions are just executed from your cursor position, and ignore the selections. However, if you select some text with the mouse, ideavim recognizes it as visual selection.
I would suggest not using the arrows for selection any longer if you have already decided to use vim (ideavim). If this function is very important to you, you could consider reporting an issue/bug to ideavim team.

Use VI keys everywhere instead of cursor keys

I like VIM a lot because it kind of doubles the power of my keyboard in a way. It's either in insert or motion or whatever they call it mode.
Navigating through source code, typing code, while being able to keep my hands in the touch type position is great.
But when a dialog box is opened (eg. the one using ctrl+F12), if I have to select something other than the first one in the list, I am forced to have to move my right hand to the cursor keys.
Is there a way so that I can use J and K or else something with ctrl or alt or something, so that I can select an item while keeping my hands in the touch typing position?
You can redefine shortcuts for the Up, Down, Left, Right actions in File | Settings | Keymap (the regular keymap that has nothing to do with IdeaVim). IdeaVim provides Vim emulation only for code editors like file editors, interactive language consoles, etc.
Edit: I guess you can't use j and k since characters typed in the structure window are reserved for searching. But you can use Ctrl+N and Ctrl+P which is the same as the navigation shortcuts for pop-up windows in Vim.
Edit 2: You can't use Ctrl+N and Ctrl+P as well due to this bug in IntelliJ.