Annoyingly, in ALL Jetbrains IDEs, when you press ENTER to open a file in a new tab, the tab does not also become active.
For example when navigating within the project window using arrow keys, when i then open a file using ENTER, i have to additionally invoke the 'switcher' with ctrl + tab if i want to start moving about/typing within that file.
This is very very annoying as it is pretty standard in IDEs that when you open a file, it also becomes active.
If i double-click the file the opened tab does become active - but i don't want to use the mouse or trackpad, it's annoying and tiring. It seems a shame to have so many keyboard shortcuts only to make the user return to the mouse/trackpad just for that ...
IS THERE a shortcut key to do this? Any setting i can change? I have looked hard but haven't even found other people complaining about this - they must be there!
Finally found the answer: assign the keyboard shortcut ENTER to the command "Jump to source".
This can be declared in XML keymap file like this:
<action id="EditSource">
<keyboard-shortcut first-keystroke="ENTER" />
</action>
Related
I want to use search, undo, delete etc. using keyboard in my main editor window and NEVER on my project window.
But once I click file in the project window, I must now do second click into the editor, otherwise my keyboard will start wreaking havoc in the filesystem.
Please tell me there is an intelligent way to disable this!
Could not find it myself, mostly because I don't know how to even name this behaviour.
In IntelliJ, there are some underlined numbers on the side menus :
1: Project
7: Structure
Like below :
So there is probably a keyboard shortcut which allows to navigate from one view to another by just entering the view number.
I tried the different digits with Ctrl, Ctrl+Shift, Ctrl+Alt etc but could not find the right shortcut.
How can I easily navigate between those views?
The shortcut is Alt + [number]
ps. There's a plugin force-shortcuts if you wanna replace your mouse click actions with shortcuts (https://github.com/treytrahin/force-shortcuts-intellij-plugin). It's super annoying but you learn really fast. And by the way here are such plugins to most editors and IDEs.
ALT+F1 opens a window where you can choose one of the views by pressing the corresponding number.
Info: It actually opens the selected file in the selected view - which is not that bad maybe - but not 100% what you want?
Also there are cool things like pressing C to open a file chosen in Project Explorer directly in Explorer for example.
I'm big on not using the mouse, especially while writing code. I've noticed in IntelliJ IDEA 2016.1 that when I'm navigating in the project window, hitting Enter while a particular file is selected opens the file in an editor, but it doesn't place the cursor in the editor. Interestingly, if I double-click on the file in the project window, the cursor is placed in the editor.
How do I configure IntelliJ to place the cursor in the editor after opening the file via Enter from the project window?
To the best of my knowledge, I do not believe there is a way to configure what you are looking for. A search for focus in the settings didn't turn up anything.
That said, hitting Esc when in the project view will return you to the editor. So you would need to do Enter, Esc. If having to type two keys in a row bothers you, you could always record a macro (Edit > Macros) to do that key sequence and map it to a shortcut.
I am using Intellij 13.1.5 running on a Mac (Mavericks).
My frustration is, I am trying to re-configure the 'Navigate -> Declaration' mapping to the 'CTRL Button1 Click' key combination
I have tried doing this using the user-interface - but it cannot recognise my attempt to Map the 'Ctrl' + Button1 Click' combination - as it is a combination of the keyboard AND trackpad usage.
Is there a way to set this by:
Editing the configuration file these mappings are persisted to on the disk?
Some other option within Intelij?
Any help would be much appreciated.
You can set keyboard/mouse combo shortcuts from Settings/Keymap. You just have to choose Mouse shortcut option.
Left Click on a command in Keymap section of the settings
Choose Add mouse shortcut (not add keyboard shortcut)
Hold down Ctrl and click with touchpad (or mouse) on the mouse icon
Here is also an alternative solution which involves directly modifying the configuration file:
Remap the shortcut to any other key (it does not matter which) and save preferences
Go to $HOME/.IntelliJIdea[X]/config/keymap (or ~/Library/Preferences/IntelliJIdea[X]/keymaps on Mac). There should be XML file which contains only your modified keybindings (and therefore the command you remapped in step 1 should be there)
Change mapping of the command to whatever you want
Example content of the XML file in question (this should translate to Ctrl + Button 1, just change the action id to the id of your command):
<keymap version="1" name="Default copy 0" parent="$default">
<action id="EditorCloneCaretAbove">
<keyboard-shortcut first-keystroke="control B" />
<mouse-shortcut keystroke="button1" />
</action>
</keymap>
And what are counterparts to eclipse's declaration view and javadoc view?
In the Project View click on the "gear" icon and enable the Open Files with Single Click option:
Use Ctrl+Q for Quick JavaDoc and Ctrl+Shift+I for the declaration pop-up.
Now it's available in a simpler way. In the Project View click on the Gear icon and then click Open Files with Single Click:
Go to Preferences and turn on Enable preview tab, that will enable Open Files with Single Click for all projects.
Javadoc opens with Ctrl+Q
There's no declaration view per se, however, you probably will be satisfied with Ctrl+Shift+I shortcut for quick lookup.
Don't know of any ways to configure it to open files on single clicks. Somehow, if you get used to the shortcuts, you skip using mouse very much. For instance, Alt+Home will bring the navigation bar up and you can move with arrows and open the file with Enter. Or just use some other shortcuts like Ctrl+N or Ctrl+E depending on the context.