Undo closed tab in Eclipse?
Asked Answered
B

5

112

I was wondering if it were possible in Eclipse PDT to reopen a closed tab by mistake.

For example in Firefox I can do Ctrl + Shift + T.

Before answered 11/2, 2010 at 9:50 Comment(0)
V
79

Yes it's possible. Close a tab and hit the left yellow arrow in the Eclipse menu bar above. You can adjust the keyboard shortcut for that in the eclipse preferences under General > Keys.

On Mac it's + [

Veraveracious answered 11/2, 2010 at 10:5 Comment(5)
This doesn't work in the case "close the tab --> go to another tab --> click yellow left arrow". However excellent for accidentally closed tabs.Vegetate
@Veraveracious Do you know the name of the command under General > Keys?Christoper
On Juno it's called "Backward History" and it's in the "Navigate" Category.Veraveracious
@Vegetate if you have moved to another tab since closing, then just press the left arrow twiceTovatovar
If you closed a tab that you didn't edit in for a while, then what?Remorseless
A
154

Try Alt + that will go backward in history - if tab is closed it will reopen it.

Apparently answered 11/2, 2010 at 10:13 Comment(2)
That key is left arrow, not a backspace. I was confused.Aeneous
Doesn't work if the tab you closed isn't the current tab (you closed it by clicking the cross)Remorseless
V
79

Yes it's possible. Close a tab and hit the left yellow arrow in the Eclipse menu bar above. You can adjust the keyboard shortcut for that in the eclipse preferences under General > Keys.

On Mac it's + [

Veraveracious answered 11/2, 2010 at 10:5 Comment(5)
This doesn't work in the case "close the tab --> go to another tab --> click yellow left arrow". However excellent for accidentally closed tabs.Vegetate
@Veraveracious Do you know the name of the command under General > Keys?Christoper
On Juno it's called "Backward History" and it's in the "Navigate" Category.Veraveracious
@Vegetate if you have moved to another tab since closing, then just press the left arrow twiceTovatovar
If you closed a tab that you didn't edit in for a while, then what?Remorseless
E
7

Navigating back through the edit history does work sometimes, but not if you close the tab without actually activating it. You can also try Alt + F to access the file menu then hit a number to access the appropriate file in the recent file list.

Emanuelemanuela answered 8/11, 2012 at 18:4 Comment(0)
S
1

You may also find the Extended VMM Presentation plugin useful. Among others, it provides a list of the last several closed tabs.

Keep in mind that so far it does not seem to work with the new Eclipse Juno.

Seta answered 18/7, 2012 at 9:38 Comment(0)
C
-1

You will be able to reopen closed editor after installing below plugin. I have installed and used it on January 2024.

https://marketplace.eclipse.org/content/recent-editors

This plugin adds features to quickly re-open recently closed files.

  • New dialog to view and re-open recently closed editors
  • Open the last closed editor via keyboard shortcut
  • The current scoll position and caret position of editors is persisted and can be restored when an editor is re-opened. This enables to continue editing at the last viewed position.

This plugin adds the following shortcuts. They can be changed in the Preferences (see Screenshot):

  • Recently Closed Files Dialog: CTRL+E
  • Re-open Last Closed File: CTRL+SHIFT+W
Concentrated answered 28/1 at 19:5 Comment(8)
Manohar Bhat, please don't just post some tool or library as an answer. At least demonstrate how it solves the problem in the answer itself.Giacopo
added details from the URLConcentrated
If you think that the screenshot is relevant part of how to use the plugin please add the screenshot here, or a textual representation/description of what the screenshot shows.Giacopo
I think this is fine. The goal of my answer is to provide pointer and not to replicate all instructions/details in the other site.Concentrated
Manohar Bhat, a link to a solution is welcome, but please ensure your answer is useful without it: add context around the link so your fellow users will have some idea what it is and why it is there, then quote the most relevant part of the page you are linking to in case the target page is unavailable. Answers that are little more than a link may be deleted.Giacopo
I understand. It is always good to have more details in answer, but like everything in life it is a trade off of with more effort. All the above answers are outdated or don't satisfy the usecase correctly. So I just wanted to include information about the existence of a plugin that correctly solves the usecase. Also, atleast for me, link rot is solved problem. I can always go and check for the URL in the web archive. Another point is, if eclipse market place website goes down then reopening last closed editor will be the least of problems.Concentrated
So what you are saying is that the habits and concepts of StackOverflow do not make sense to you and you do not care about recommendations on how to make a good answer, because the effort expected of you to do so is not worth it. Well .... if you think so.Giacopo
No, I didn't mean that. I feel those are general guidelines and not blindly applicable for each answer. It depends on the context as well, For example here, I agree that small description of plugin is useful instead of just link. It will give an idea to the reader and he can decide whether to visit the site or not. Including screenshots and finer detail, you will just replicating content of other site, it does not seem worth it as the user has to anyways visit the link to install it and maybe checkout comments from other users of the plugin there.Concentrated

© 2022 - 2024 — McMap. All rights reserved.