I am working on an Intellij Plugin. When a button is pressed I would like to have the project save itself(like when the user modifies code) before the plugin executes. I can't seem to find a way to do this
Use FileDocumentManager.getInstance(project).saveAllDocuments().
You can use ApplicationManager.getApplication().saveAll();
I very often do rebasing from IntelliJ IDEA as it is more convenient than command line.
There's one issue though. In the following window:
I have no idea how can I choose Action using just keyboard. Is this possible?
IDEA's documentation does not mention any shortcuts at all, but e.g. CTRL + D or ALT + UP/DOWN work for me there.
Issue is still opened on YouTrack: https://youtrack.jetbrains.com/issue/IDEA-153448
Currently I run with spell check disabled globally in IntelliJ as it ends up being more annoying than helpful most of the time. But there are many times where I'd like to quickly toggle it on and off to check the spelling of things I'm unsure of.
My current workflow in this case is to switch over to sublime then hit my toggle spell check key binding there and then jump back to IntelliJ, which isn't really ideal.
After Google searching around for it all I found was "how to disable spellcheck in IntelliJ" which I already know how to do and searching for "toggle inspection shortcut" was also unfruitful. So does anyone here happen to know if there's a way to bind toggle spell check(or toggle an individual inspection) to a keyboard shortcut in IntelliJ?
If not I might end up writing my own IntelliJ plugin today as I really really want this..
The best thing you can do with out-of-the-box functionality is using Analyze | Run Inspection by Name..., selecting "Typo" from the list and then selecting the scope to run it on.
If you want to run it with a single keyboard shortcut, you'd indeed need to write a simple plugin.
So I ended up making the plugin this late-ish afternoon in a couple hours (thank you yole for telling me it couldn't be done without a plugin before I started work on the plugin). I added the spell check toggle I wanted plus 3 custom toggle bindings that can be bound to any inspection you want.
It's currentley awaiting moderation to get in the JetBrains plugin repository but you can download the plugin jar from my website here.
And I put the source code up on GitHub here
I'm looking for a webstorm plugin that would help me remember keyboard shortcuts. I know for a fact that this plugin exists for IntelliJ, it displays the right-shortcut every time we perform an action without using shortcuts, but I didn't find any thing like this for webstorm?
If you know (and understand) what I'm talking about, can you tell me what plugin could help me with it?
Thanks for your time,
Fabien
Key Promoter plug-in is compatible with WebStorm, you can also use Help | Find Action and type the action name, shortcut will be displayed on the right.
This seems like a bug in IntelliJ 12: Every couple of times when I switch between keyboard layouts (English and Hebrew) IntelliJ get stuck on one of them and ignore the windows selected keyboard layout. This happens only for intelliJ, all other programs respond as usual to the windows selected keyboard layout.
Is there at least a workaround, or a way to reset IntelliJ's keyboard layout? The only thing that seems to work for me so far is restarting my machine...
(My OS is Windows 7 Enterprise 64bit)
This is 100% reproduced when you switch keyboard layout in quick class search (Ctrl+N). Also in intellij idea 13.
Something like:
Open quick search menu when keyboard is not in English layout (Russian e.g.)
Type anything
Switch to English
Congratulations! you stuck in russian layout :) restart your intellij idea!
When I ceased to switch layout in search, I forgot about this problem.
UPD: it's suitable for most part of text inputs (even for search and file creation)
I've just had this problem on PyCharm 2020.2.3
Here's how I've solved it:
Go to Settings -> Keymap
At the bottom of the window, check the option Use national layouts for shortcuts (require restart)
That did the trick
restarting IntelliJ also works.
I wonder how they managed to get such a stupid bug, this is not an easy bug to write, especially in Java.
That was found to be more like a global Microsoft/Oracle bug. Simple workaround from IntelliJ's issue tracker: use Windows' language parameters to assign a hotkey (Ctrl + number) for changing the layout directly to a desired language. This suddenly will affect both Windows And IDEA. It's said that bug was fixed in Win8. A bit more info: here
In 2020 bug is still relevant in the most IDEs based on IntelliJ. For example I observe this in PyCharm now.
There is workaround for Windows:
Go to Language Bar - Settings... - Advanced Key Settings
Set key sequence of To English action to Ctrl + 1
Set key sequence of to other your language to Ctrl + 2
Apply
Go to IntelliJ/PyCharm and switch language by new sequences
After that bug disappears and you can switch language by traditional method
For me the following actions seem to resolve the issue:
Go to Control Panel
Select Clock, Language & Region
Press Region
In the opened window choose English for Format.
Also all my settings except the location are set to English (locale, default keyboard etc.)
This fix worked on my mac, access Preferences -> Editor -> Typing Corrector from the intellij IDEA menu. If you are able to navigate to the same window on your OS, you can try this.
Uncheck Enable keyboard layout correction in the Typing Corrector window
I got the same issue in Ubuntu 16.04. Restarting IDEA doesn't change anything. But Changing the default layout to be the one I want by default ensured ubuntu work well with it.
Go to the search textfield above file editor.
Switch layout.
Type smth.
Click somwhere in the file editor.
Write smth with swithed layout.