IntelliJ new tabs opening on the left side, why? - intellij-idea

Say I have a Java class, and navigate to another method by CTRL + CLICK .. The new file opens, in a tab that is positioned to left of the current one. Why? It should open to the right.
Is this a bug? It goes against any other known ways of opening new tabs, like Chrome, Firefox, etc. Is it possible to alter this behaviour?
I would like it to open the tab either at the right side of the current tab, or at the end of the right side.

If you want to open a new tab at the end of the right side, now IntelliJ IDEA (mine is version 2017.2.4) offers you the option.
Right click at the tab bar and select "Open New Tabs At The End" option.

UPDATE (November 2019)
If you want new editor tabs to be opened at the end, the latest IntelliJ IDEA versions have the dedicated option "Open new tabs at the end" for that in the settings:
Settings > Editor > General > Editor Tabs
Screenshot taken from IntelliJ IDEA 2019.2.4 (Ultimate Edition)

This behavior is by design, otherwise if you follow the link in the editor and the new tab opens on the right, after closing this new tab you will be navigated to yet another editor tab on the right instead of returning to the tab from where you started.
This breaks the workflow when you navigate with opening a new tab and want to return back by closing the new tab. It was decided to open new tabs on the left when Activate right neighbouring tab option is enabled.
If you don't like this behavior or want to suggest a better solution, welcome to YouTrack.

Related

How to close other tabs in IntelliJ using keyboard shortcut?

Is there any default keyboard shortcut to close all tabs except the active one? It can be done by right-clicking the tab and choosing Close Others but I'd like to do this using only my keyboard.
ctrl+shift+a and write Close Others. Select the one with Editor Close Actions.
Or assign it your own shortcut.
Open Settings > Keymap. Search for Close others (or find it under Main menu > Window > Editor tabs.
It's not possible to access the tab context menu using the keyboard.
There's an open issue against IntelliJ for this.
Their suggestion is to add that action (tab > close others) to a quick list and you can then invoke the quick list action via a keyboard shortcut.

Show a most recently used tab after dragging a tab in IntelliJ IDEA

In IntelliJ IDEA, I want to show a most recently used tab after dragging a tab like eclipse. For example,
a.java
b.java
c.java(Current)
...
d.java(Previous) -- hidden by dropdown
In case 'c.java' was dragged, the editor shows 'a.java' instead of 'd.java'.
I want it to behave same as 'Activate most recently opened' setting for closing tabs. But it doesn't work for dragging in case the previous tab is hidden by a dropdown menu. Is there any setting for it?
No, there is no setting for it.

IntelliJ IDEA - detach editor window

I have recently removed tabs from my IntelliJ setup, because with all the features available to navigate between files, who needs them?
The issue is, the normal way of detaching an editor window would be to drag the tab onto another screen (or area). There doesn't appear to be anything in the key mappings for detaching an editor window. Is there a way of doing this via the keyboard?
The keyboard shortcut your are looking for is SHIFT+F4 (the action assigned to this shortcut is called Open Source in New Window. When you invoke this action the currently opened tab (file) will be opened in new editor window. However the file will remain opened in the main window too, but I believe that this is as close as you can get to the functionality you describe, at least for now.
Option 2
Open the "Open class" dialog using CTRL+N search for a class you want to open in detached window and hit CTRL+SHIFT+ENTER. That will open the class in a new editor window.
Unfortunately this seems to work only for Java classes and not for other files (CTRL+SHIFT+N dialog). I created a bug report for the last problem, so if you think it might be useful, feel free to vote for it.

How to open two side by side window in eclipse kepler

Can someone tell me how to open two or more file editor in eclipse kepler?
In before version like helios it can be open by shortcut ctrl + 8.
Which looks something like this in helios
But in kepler I am not able to do this.
Open your file and then Window -> New Editor
I see that in Kepler this feature hasn't a shortcut binding anymore. You can make this yourself by going to Preferences -> General -> keys and search for "new editor". Then click Binding and press the shortcut you want.
You can achieve this indirectly, like first opening both the files then click on your file header in your editor and just drag towards the right.
Eclipse will automatically creates two seperate views like you have shown.
Window / New Editor opens a second editor. It does not seem to have a default key binding.
When the second editor is open drag the tab to open the windows side by side.
What command is Ctrl + 8 bound to in your workspace ? I've looked at 3.8.2 but can't find it (even though I do vaguely remember doing something like this).
There is a way.
Window -> Editor -> Clone
Drag out window to console and it will divide in two parts ..then put both editor side by side.

Is there a search history in Intellij IDEA?

A feature that I used a lot in Eclipse is the Search History, which remembers searches you performed in the past and gives you quick access to them. I cannot seem to replicate this functionality in IntelliJ - it seems that I have to start a new search each time. Does this feature exist, or does anyone know of a plugin that provides such a feature?
I think what you're looking for is the "Open in new tab" checkbox at the bottom of the "Find in path" dialog. For me by default it was disabled. When you enable it, you will have search results open in separate tabs every time, so accessing historic searches will be much easier.
For recent "Find Usages", open the "Find" window (Cmd 3); click the settings button in the "Find" window toolbar; in the settings dialog check the checkbox "Open in new tab".
Inside 'Find' dock press Alt+Down to see 'Recent Find Usages' dropdown.
Search history intellij alt up or alt down.
For in-file search there is Recent Searches drop down if you press the down arrow key, the same is available for the Find in Path dialog.
Alt+down arrow is what you are looking for...
First press Ctrl+Shift+f and then alt+down arrow
for more info check IntelliJ website:
https://www.jetbrains.com/help/idea/searching-everywhere.html#search_all
Using Alt+down works to see previous Finds, but by default only 1 Tab is open.
Of course the setting for opening new Finds in a new Tab can be found in a slightly different place than when the first answer was posted. It can now be found by right-clicking the top bar (or the "Show options menu" gear-icon) -> View Options -> Open Results in New Tab.
Click on the magnifying icon in the find window and you will see it. It is not intutive. I'd expect it to list the previous searches when I click on the text box window.
just when you user find by path, right corner of the search you will find the "open
in find window" there you will see history as shown in the image and you can pin the search history you need . just hit the <- arrow button in the left panel of find window, you would see the history