How to move focus to another "tab group" in Intellij IDEs - intellij-idea

IDEs based on the IntelliJ platform let you split the editor in various ways, but I don't see an option to move focus from one editor to another using just keyboard (something like other-window from Emacs).
Is there an "action" to do that?

For mac users, the default shortcut is option + tab

I think you're already find answer, but for someone who have same question and find this post like me.
Go to Prefernces -> Keymap or simple use search in preference and find Goto Next Splitter and make your own hotkey for this action.

Main Menu Window | Editor Tabs | Select Next/Previous Tab
There's also Switcher (Ctrl+Tab) available in the same menu as Goto Next/Previous Splitter which switches between splitted editor parts, tool windows, and many other things.

For macOS it is option + tab keys to switch between tab groups

ctrl + tab works for Windows system.

Related

Konsole keyboard shortcut for switching between active Split View?

The KDE 5 terminal emulator Konsole has a great feature Split View that allows me to make full use of my big monitor. However, I cannot find a way to use keyboard shortcuts, rather than clicking mouse, to switch between the active views (see: The Konsole Handbook). This apparently reduces the work efficiency. Anyone has an idea how to enable this? Thanks a lot in advance.
What works on version 19.08.2 is Ctrl+Shift+Arrow. You can use up, down, left, right as required.
Ctrl+Tab can be used to switch between all views including in other tabs. It is like Alt+Tab of window managers that you can switch between last ones relasing the Ctrl and using this shortcut again.
You can use the shortcut Shift + Tab.
the shortcuts are called Focus (Above|Below|Left|Right) Terminal. by default they are mapped to Ctrl+Shift+Arrows.
to change these shortcuts, go to Settings -> Configure Keyboard Shortcuts -> Search for "focus".
Shift+Right/Shift+Left should work to navigate between the Konsole tabs.
shift + tab worked for me to switch across multiple tabs that are open in an active split-view screen on a Konsole application in CentOS versions > 6.x

Cycle through autocomplete suggestions without arrows

I'm really impressed with the autocomplete feature of the IntelliJ IDE so far.
What I'd like to do, is cycle through the autocomplete suggestions I get when hitting Ctrl + Space without using the arrow keys (↑, ↓).
The reason for this is that I prefer to keep my fingers on the home row (I'm using IntelliJ's Vim emulator additionally).
For example, how would I select sortThis instead of sorted without using the arrow keys or the mouse?
Peter Gromov's answer brought me to a satisfying solution:
In IntelliJ's settings, for Keymap → Editor Actions → Down I set a custom shortcut: Ctrl + J.
This way I can cycle forward through the suggestions.
Setting a shortcut for Down with Selection or Scroll Line Down in the IdeaVim-specific shortcuts did not affect the selection of autocomplete suggestions though.
The answer here: https://stackoverflow.com/a/9713306/2370679 led me to discover that Ctrl+n & Ctrl+p allow navigation of the auto-complete options without having to modify any settings
For macOS the IDE will give a hint that "^↑ and ^↓ will move caret up and down in the editor". These clearly do not work.
There are a few extra steps that are needed after following #matthias-braun's solution.
Here is the full list of step that I use:
Go to Preferences -> Keymap
Expand Editor Actions (not Plug-ins -> IdeaVim)
Select Down
Click the pencil icon or right-click
Select Add Keyboard Shortcut
Press the shortcut (I use ^N)*
Repeat for 3-6 for Up (I use ^P)
Click Ok**
Go to Preferences -> Other Settings -> Vim Emulation
In the drop-down under the Handler column for the row containing Down, select Vim***
Do the same thing for Up
* If you are warned about the key binding already existing then remove it. You can always reset back to the defaults by clicking the little cog icon up the very top to the right of the drop-down menu.
** The Vim Emulation doesn't seem to be populated correctly until you reopen the Preferences.
*** I'm not sure why the Handler should be Vim. This seems backwards to me but it works.
If you're able to scroll up/down in editor with some IdeaVIM-specific shortcuts, they should also work in the completion list.
In this particular case, I'd just type another "t" so that "sortThis" becomes selected (and the only) variant.
I have done the same thing with mapping the arrows but in a more logical way:
I mapped them that when I press 'Alt' 'J' is left, 'L' is right, 'I' is up, and 'k' is down. that way I can have easy access to the arrows while my fingers are on the home row and I don't need to move them nearly as much...
I'm posting it just so people who search it on google can have that idea.

Intellij IDEA: Hotkey for "scroll from source"

I can't find a hotkey for the feature "Scroll from Source".
What is the difference between Scroll from Source and Scroll to Source as well?
In the latest IntelliJ IDEA, there is a keymap entry called "Select in Project View" with no default shortcut. Just add a shortcut key to it. No need for a plugin.
tldr;
Alt + F1, then 1
First checkout your shortcut key for the "Select In.." item in the Navigate menu.
Click in the file you're editing, hit the shortcut key for "Select in".. then press 1.
I've changed the hotkey for select in to Alt + 1 so that my key combination is the easy to remember Alt + 1, 1
There is a plugin for this now.
It's called Scroll From source:
https://plugins.jetbrains.com/plugin/7606?pr='
This is now builit in see #Dimitrov answer
https://stackoverflow.com/a/42025214/961018
There's no configurable shortcut in the Keymap settings, and it does not appear in the "Enter action" dialog, so I'm pretty sure it's not (yet) configurable, even if I agree it would be very appreciable.
You can use the navigation bar Shortcut keys as well.
On Mac
Hit ⌘ + ↑ (command and up key)
Hit ← (left arrow)
Hit ⌘ + Enter
This will take you to the folder in project view.
It's worth having a play round with the navigation bar.
IntelliJ really have this covered :)
For ubuntu i did ALT+L (cause ALT + F1 is busy), then just enter.
If you are using JetBrains Rider, then the shortcut is Locate in Solution Explorer:
As a much much much much much better alternative to the scroll from source functionality you can use the Navigation bar.
Note: double clicking on the folder in the navigation bar will scroll to that folder in the Project view, (i.e. the same functionality as scroll from source).
You can show the navigation bar in the view menu, there's also a shortcut for each OS (cmd and up arrow ⌘ + ↑ on OSX, Alt + Home on Linux and Windows)
So it looks like this...
And it allows you to browse through the folder structure containing the file in focus in the main editor.
https://www.jetbrains.com/phpstorm/help/navigation-bar.html
https://www.jetbrains.com/idea/help/navigation-bar.html
https://www.jetbrains.com/webstorm/help/navigation-bar.html
In Ubuntu 18 you can disable shortcut Alt+F1, the super key(windows key) do same thing.
At moment i disable/changed this shortcuts of ubuntu
Alt+F7 --> windows+F7
Ctrl+Alt+L --> windows+L
Alt+F1 --> windows
Another better way:
The Shortcut is called Select in Projec View
The default shortcut is
CTRL+Alt+1
or you can edit this.
Source: https://intellij-support.jetbrains.com/hc/en-us/community/posts/206717285-Scroll-from-source-keyboard-shortcut-?flash_digest=77b77d09d61eff96f7d59697820dee45b2c2041c
UPDATE: Now you can easylly use Shift+Alt+1 in Gnome Keymap or Alt+F1 in Windows Keymap
Blockquote
If I understand correctly you don't want to toggle the option so much as trigger the file browser tool window with the selection being the currently edited file.
Just leave 'Scroll From Source' enabled and open the file browser with Command + 1 on OSX or CTRL + 1(i think) on Windows. The file browser sidebar will be selected and your selection will be highlighted.
This answer also explains the difference between Scroll To and Scroll From: How to make Scroll From Source feature always enabled?
In JetBrains Rider, this action used to be named Locate in Solution Explorer, but is now (v2019.2) named Locate/Select in Solution View and by default (at least with the built-in ReSharper keymap) bound to Alt+Shift+L.

How to close a file in Intellij using a keyboard shortcut?

I know this is a simplistic question; but I've been using IntelliJ for months now, and can't find this simple feature.
Any idea? Thank you.
Idiot me. CMD-F4 or, as mentioned before, CTRL-F4.
Thank you all. I'll just bury myself now :)
hmm you can't because there is no default key binding for that, at least on OSX, however you can go here and define one:
The standard tip if you don't know how to do something in Idea is "Find Action..." (ctrl+shift+A in Windows) then type what you want to do, in this case close.
You will get a lot of different "close" actions and simply "Close" (ctrl+F4 in Windows) will be one of them.
You can also set a custom key combination in the settings menu
Click on File > Settings and select Keymap from the menu on the left, then scroll down to the Other section and set your preferred key combination for Close Active Editor:
When you double-click on Close Active Editor, a menu pops up allowing you to set a key combination, a mouse gesture, or even an abbreviation for the action. If the shortcut is already set somewhere else (as in my case with Ctrl-W) you'll get a notification and won't be able to set the shortcut until you remove the other one.
As with Matt Ball, I don't use IntelliJ but may also be CTRL+F4...
For MAC user, Cmd-W will close the active tab (file).
On Mac, you might like to use CMD + W, as this is the conventional shortcut for closing things e.g. Tabs in Chrome.
But by default this is usually associated with highlighting the current cursor block, so instead I use CTRL + W, rather than re-assigning.
e.g. (bottom right)
Also works for other IntelliJ IDEs, like WebStorm, etc.
IDEA->File->Setting->Search for "Close Active Editor".
Click on 'Add Keyboard Shortcut' -> Change it to "Ctrl+W". (Overwrite).
BOOM! you are universal now!
I'm on version 2020.4 and this has changed to Ctrl+4

IntelliJ Split Window Navigation

If I split the editor window (horizontal or vertical) into N tab groups, how do I switch/toggle from one tab group to another via the keyboard? If all of the tabs are in the same group you can switch from each tab easily (CTRL + right/left arrow), but when they're in separate tab groups I can't. I've searched through the key mappings and have not found one that seems to accomplish this. I know I can use the mouse, but I'm trying to find ways to avoid the mouse and stay with the keyboard.
TIA for any help on this.
Ctrl+Tab and Ctrl+Shift+Tab for Window | Goto Next Splitter and Goto Previous Splitter. However, these hotkeys may be taken by the Switcher, so you need to remap them in Settings | Keymap.
It looks like it's now mapped to Alt+Tab and Shift+Alt+Tab so no need to remap (at least for OSX 10.5+ settings).
I had the same case and this plugin solve my problem:
https://plugins.jetbrains.com/plugin/7475-tab-shifter
https://github.com/dkandalov/tab-shifter
As I write this, here is what it support:
Move tab to another editor split
Move focus between splits
Resize the split
You may refer more details on the page/github. It works pretty well in 2019.2
I can switch the splitters with CTRL+E and then ENTER.
If you have more then 2 splits, then you can navigate or quick search in the Recent Files dialog.
Switching the splitters with the Switcher doesn't work.