how to return run default content for intellij - intellij-idea

I used one of the best shortcuts for Intellij:
Ctrl+Shift+F10
And it runs default content, which will be open.
I don't know how, but now it really do nothing.
All other short cuts are ok. And this one is dead (doesn't work anymore).
How to return to this useful short cut (or general set to Intellij default)?

Well since you have a psvm method, and your focus is in the code for that class when you press the shortcut, and given your caps key isn't on, then you should see IntelliJ try to make before running your code.
Do you see it Making ?
If not, it's likely another plugin or action has stolen the key shortcut.
Go to Settings -> Ide Settings / Keymap, and type RunClass in the search box.
You should see this: Run context configuration -> Ctrl + Shift + F10
If the key shortcut is missing, assign it.
Hope this helps.
P.S. I was recently using the Haskell IntelliJ plugin which conflicted with this shortcut. Disabling it did the trick to restore it.

Related

How can I run the current test with a keybinding in IntelliJ IDEA 2018.2?

Recently upgraded to IDEA 2018.2
In previous versions of IDEA, I was able to bind Run configuration... to a key (ctrl-shift-F10 is what I used) in order to run the current test ("current" meaning the test that my editor cursor was inside).
Note that the functionality itself still exists, you can right-click on test name and select "Run" and it will run that test.
But I can't figure out how to map that functionality to a keyboard now - does anyone know the new way?
EDIT:
The answer below is correct, but be aware that you might need to restart IDEA to pick up the new key mapping.
You can bind a keyboard shortcut of your choice to the action Run context configuration.
If you go to the keymap settings and search for that you should be able to set the keyboard config of your choice and be able to run the current test.
Keep an eye of conflicting keyboard shortcuts (inside and outside intellij!)

IntelliJ IDEA 14 Copy and Paste not working with other applications

Couldn't find the simple solution on SO, so thought I would add this here for anyone looking in the future.
My symptom was that I could copy and paste within the IJ editor, but not from the editor to another application or from another app to the editor.
This was on Windows 10 with IntelliJ IDEA 14.1.6.
I have found the best solution yet (for me in any case). I have tried everything! Including adding and removing Keymap options. And this is actually where the problem lies...sort of.
When you have the Vim plugin installed, Ctrl + c and Ctrl + v is allocated to Vim.
To change that, go to Setting>>Other Settings>>Vim Emulation and set the Handler to IDE. Apply and OK, and Voila!
My solution (thanks to a similar issue reported with Android Studio) was to run IntelliJ as an admin.
Steps to always run IntelliJ in admin mode:
Right-click on IntelliJ icon in start menu search (or wherever you started it) -> Open file location
Right-click IntelliJ shortcut -> Open file location (yes, again to get to the .exe, not the shortcut.)
Right-click idea.exe -> Properties
Compatibility tab -> check Run this program as an Administrator
Right-click idea64.exe -> Properties (if you run IntelliJ in 64 bit mode)
Compatibility tab -> check Run this program as an Administrator
Same problem drove me completely insane but this
https://www.quora.com/Why-doesnt-Ctrl+V-and-Ctrl+C-work-in-IntelliJ-IDEA-14-0-2-on-Linux
worked for me:
You might try Ctrl+INS for copy and Shift+INS for paste and see if they work. They are the traditional cut and paste and have been around a lot longer than Ctrl+c/Ctrl+v.
i don't know why, but this worked!
To make copy/paste through shortcut keys working with Vim Plugin you need to change some settings of Intellij IDE's editor regarding vim emulation, you need to follow these steps for it:
Click Menu File > Settings... (or use shortcut Ctrl + Alt + S)
Select Editor -> Vim Emulation and find the shortcuts and change their Handler column value to IDE as shown in the screenshot below.
The Shortcuts will start working, happy coding :)
Another solution i've found
https://code.google.com/p/android/issues/detail?id=173201
was:
Try to minimize Idea window and move it on the same monitor where is the code that you want to copy and paste it. After this small minimize and move exercise the clipboard starts working.
Ctrl-Shft-V starts working after this for me!!!!!
Try to enable "Use national layouts". Settings- Keymap.
For some reason it worked for me.
PyCharm - Setting>>Vim Emulation Set - Control + V/P/A to IDE

Idea shortcut 'Go To Implementation(s)' doesn't work

I faced a very strange problem: in someday(I don't really know when) the shortcut
Ctrl+Alt+B stoped working. This shortcut is just Go To Implementation(s). I still can do it by Ctrl+Alt+Mouse1.
I opened settings, to check how is this shortcut configured - all looks fine for me. So I tried to remove Ctrl+Alt+B and add the same combination again.
In Enter Keyboard Shortcut window I have to press key's so the IDEA would be able to set this shortcut. But I cannot record these combination, I still can record Ctrl+B, Ctrl+Alt+Shift+B, Alt+B, but not the right combination.
I looked at idea log file, but there was nothing criminal.
I wonder if some other application catches this combination, but I doesn't know how to find this application.
PS. I run my Idea on win7
By the way you're describing it, I strongly believe that the problem is not related to the IDE itself but probably some other program listening for that same key combo in a global level.
Its common to lose some keybinding after installing new applications or drivers. For example, I've lost some key bindings in my IDE after installing drivers for Intel Integrated Graphics. The driver was "stealing" hotkeys like Ctrl + Alt + < arrow > used to rotate the screen.
Double check for newly installed or updated programs/drivers, and make sure that they don't have any shortcut that may be conflicting with your IDE.
Also, you might use Hotkey Commander to verify which program is handling your Ctrl+Alt+B.

IntelliJ IDEA - Key board right click doesn't work

I am using IntelliJ IDEA Ultimate v 13.1, and I am fond of using key board short cuts, rarely use mouse. I am relatively new to this IDE as earlier I always worked on eclipse.
My question is about performing right click operations by pressing the right click key on key board (usually found near the right side Ctrl key on external key boards). The problem is when I press this key, nothing happens but when I click the mouse right click and things just happen. This is applicable on editor, project explorer and I guess everywhere in the IDE.
Is there a switch I should turn on and it will work or any other way to get key board right click work in IDEA? Thanks very much for your responses.
I know it is an old question, but it popped up as 1st result when I searched for my issue, and I figured it out with some of the context in Ketan#'s answer.
Fix:
Go to File -> Settings -> Keymap
Search for "Show Context Menu"
Add a new keyboard shortcut. When prompted, press the "right click" (aka "context menu") key.
For me, It simply works after just restart the IntelliJ IDE
Sometimes accidents just happen for good! This one falls in that category :)
Somehow IDEA was unable to load any of my projects, and I thought of deleting '.IntelliJIdea13' directory from my user directory. Initially I didn't change my keymap (shortcuts) to Eclipse and right click just works fine.
In any case the problem is there for IntelliJ to fix. They should allow right click from keyboard to work even when shortscuts are mapped to Eclipse style.
I tried to change the shortcuts to Eclipse and keyboard right click stopped working. When I change it to default, it starts working.
If you was installed it with jetbrains toolbox you can't made it easily.
I made a script written in php but you could adapt it to other languages:
https://gist.github.com/firegore2/0ba76d74f070b07eda5a12f3f24ba054

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