28

In Firefox we have ctrl+W to close current tab and ctrl+ shift+ T to open last closed tab.

Same in eclipse , we have ctrl + W for closing current file. But is there any shortcut for opening last closed file?

Priyank Doshi
  • 12,895
  • 18
  • 59
  • 82

2 Answers2

52

Yes it's possible. Close a tab and hit the left yellow arrow in the Eclipse menu bar above or ALT + LEFT from keyboard, will open you closed files in eclipse editor

zzlalani
  • 22,960
  • 16
  • 44
  • 73
thar45
  • 3,518
  • 4
  • 31
  • 48
  • 33
    Incorrect. This works only when you close active tab. Actually `Alt`+`Left` moves backward in the editor navigation history, i.e. returns to the **previous edit location**, that doesn't necessarily mean closed tab (just try to open 3 tabs, switch 2 times between 1st and 2nd tab, then close **inactive 3rd tab**, and press Alt+Left). Eclipse's bug tracker has corresponding ticket since 2008: [Open last closed tab](https://bugs.eclipse.org/bugs/show_bug.cgi?id=236240) - vote for it. – Victor Dec 07 '12 at 07:46
  • Victor is right. Alt+LEFT go to previous edit location as well as Alt+RIGHT go to forward. – tienthanhakay Aug 11 '18 at 04:05
16

The last file to be edited is shown at the end of the File drop down menu. Selecting it from that menu will re-open the file. By default the 4 most recently edited files are shown. The preferences page lets you change that number to no more than 15. That's the best you can do.

Chris Gerken
  • 16,221
  • 6
  • 44
  • 59