Open files in the same tab that is currently visible

已回答

I want to change the default behavior of the file navigator to open new files inside the same visible tab that currently is visible.

 

I also want to change the default behavior of the navigator such a single click will open the file (rather than the double click necessary today which opens the file in a new tab 😠)

 

 

0

1. https://youtrack.jetbrains.com/issue/IDEA-110130

2. Enable the Autoscroll to Source option in the Project View.

See also https://www.jetbrains.com/help/idea/editor-tabs.html (Navigation from non-modified tab will reuse it).

0
Avatar
Permanently deleted user

I believe I've followed those instructions (before posting my question) . Thank you in any case! 

But I find it this behavior to be completely INSANE!!!! Generally just a terrible user experience and I am really suffering here.

Why does selecting (single press now :)) a file need to open a new tab!??!?!?!?!?!?!??!?! (After I enabled "Autoscroll to source" for instance)

What does selecting a file have anything to do with that file being "non-modified" (or modified??) ???

Why can't the current tab change while the file is modified? Cant the editor just put a simple "*" or "bold" around the name of the modified file in the file navigator?

What I am seeking isn't an insane behavior. It is happening in countless other editors such as XCode / Sublime/ Atom / .... List goes on and on and on....

 

I now have to many tabs open to count. This is a huge eye-sore and a horrible waste of time

 

0

> What does selecting a file have anything to do with that file being "non-modified" (or modified??) ???

It's for navigating from the code only, not from the project view. You edit some file and want to lookup another place in the code, so that the file being edited is not closed automatically. IntelliJ IDEA saves files automatically so it may be not what you expect. This is a core difference from many other IDEs and editors, see https://stackoverflow.com/a/7377886/104891.

Modified files can be marked with asterisk in the open tabs: Settings | Editor | Editor Tabs | Mark Modified tabs with asterisk.

> What I am seeking isn't an insane behavior. It is happening in countless other editors such as XCode / Sublime/ Atom / .... List goes on and on and on....

I didn't hear a lot of complaints before about this behavior, so most users seem to be happy with it (the linked ticket has only a couple of votes in 4 years).

You may consider disabling tabs at all, it really saves a lot of time: http://hadihariri.com/2014/06/24/no-tabs-in-intellij-idea/.

-1
Avatar
Permanently deleted user

> What does selecting a file have anything to do with that file being "non-modified" (or modified??) ???

It's for navigating from the code only, not from the project view. You edit some file and want to lookup another place in the code, so that the file being edited is not closed automatically. IntelliJ IDEA saves files automatically so it may be not what you expect. This is a core difference from many other IDEs and editors, see https://stackoverflow.com/a/7377886/104891.

<<<<<

       So navigating from the project navigator still opens a new tab? - doesn't solve the problem at hand

Modified files can be marked with asterisk in the open tabs: Settings | Editor | Editor Tabs | Mark Modified tabs with asterisk.

<<<<<

       Marks the tabs - Not the file in the project file navigator 

> What I am seeking isn't an insane behavior. It is happening in countless other editors such as XCode / Sublime/ Atom / .... List goes on and on and on....

I didn't hear a lot of complaints before about this behavior, so most users seem to be happy with it (the linked ticket has only a couple of votes in 4 years).

You may consider disabling tabs at all, it really saves a lot of time: http://hadihariri.com/2014/06/24/no-tabs-in-intellij-idea/.

<<<<<<

      I don't want to disable tabs - I work on 2-3 classes at the same time and want each of them open in their own respective tab- Many times when working on a class I drill down into others - for instance to see the implementation of a property (should stay in the same tab)

 

 

In other words, I should be in control of when a tab opens - NOT THE IDE. 

 

You can imagine a case where every time you were to open a link in your browser a new tab would open. Obviously that isn't the case. 

 

I need to press this small button at the edge of the tab bar

 

Or in XCode

 

 

Or in atom:

 

0

> So navigating from the project navigator still opens a new tab? - doesn't solve the problem at hand

Yes, we didn't say there is a solution for your problem.

> Marks the tabs - Not the file in the project file navigator 

As I've explained, that would make no sense in IntelliJ IDEA model since the files are saved automatically when you close them.

> Many times when working on a class I drill down into others - for instance to see the implementation of a property (should stay in the same tab)

In most cases you don't need to open the new tabs, use View | Quick Definition.

0
Avatar
Permanently deleted user

Is this problem still not fixed? I can't believe this is such an issue. This is the single worst thing about IntelliJ, which is an incredible IDE other than this problem. 

0

Cemozer2018 you can check the status at https://youtrack.jetbrains.com/issue/IDEA-110130 . As of now it's still open.

There was a plug-in suggested which addresses the issue: https://plugins.jetbrains.com/plugin/12778-quick-file-preview .

1

请先登录再写评论。