Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add shortcut to open last closed tab #2415

Closed
Garrett-R opened this issue May 7, 2015 · 16 comments
Closed

Add shortcut to open last closed tab #2415

Garrett-R opened this issue May 7, 2015 · 16 comments

Comments

@Garrett-R
Copy link

Ok, I'm being a bit spoiled with this feature request and Spyder is already insanely awesome.

It would be nice to have a keyboard shortcut to re-open the last tab(s) you just closed. This would be like Firefox or Chromium where you just hit CTL+SHIFT+T a couple times when you mistakenly close some tabs.

@thewhitetulip
Copy link
Contributor

@ccordoba12 @goanpeca I would like to work on this!

@Garrett-R
Copy link
Author

Yayy!

@goanpeca
Copy link
Contributor

goanpeca commented Aug 7, 2015

@thewhitetulip cool, need some pointers? @Garrett-R, how far in the history you had in mind? I guess the limit will be the same as we currently store in the last opened files?

@thewhitetulip
Copy link
Contributor

What I have in mind is that there will be a function which is triggered when we click the close button, I can get the tab object and store it somewhere, maybe a sqlite file or a plain file and then open a new tab with the same file name, that way we can open the tab even after spyder is closed and opened again. I don't know where to start though

@Garrett-R
Copy link
Author

@goanpeca, good question. Maybe imitate Firefox? The default limit seems to be 10 tabs. I'd guess it would be very rare for someone to need the 11th closed tab.

I also think the history can be flushed between sessions as in Firefox.

@thewhitetulip
Copy link
Contributor

we can keep unlimited last closed tabs as well :D

@thewhitetulip
Copy link
Contributor

pull request: #2610 should fix this issue.

The thing with this implementation is that the maximum number of recent files is going to be the value set for that by the spyder.ini file, which is 20 for default. History isn't flushed between sessions.

@ccordoba12
Copy link
Member

@mariacamilaremolinagutierrez, please rebase PR #2611 in top of 3.x and finish the work of @thewhitetulip :-)

@mariacamilarg
Copy link
Contributor

@ccordoba12 I already did the rebase in top of 3.x after cloning @thewhitetulip 's spyder fork. However I am not sure how to update the PR because I don't have permissions on his repo. I can't push onto it so that the PR is updated. Also, his PR is like this:

image

So we'll need to change master and replace it with 3.x

@goanpeca
Copy link
Contributor

@mariacamilaremolinagutierrez just take his work and recreate it on a new PR made by you. That is the easiest ;-)

@ccordoba12
Copy link
Member

ccordoba12 commented Oct 30, 2016

@mariacamilaremolinagutierrez, as @goanpeca said, after rebasing please keep commiting to the same branch (i.e. last_open_tab) and when you're done, just push that branch to your fork, and then create a PR with it :-)

@mariacamilarg
Copy link
Contributor

@goanpeca @ccordoba12 Awesome, I just did that then, I didn't know I could push other people branches to my repos, that's so cool!

@ccordoba12
Copy link
Member

Yep, that's great!! I've done that several times already ;-)

@goanpeca
Copy link
Contributor

:-)

@thewhitetulip
Copy link
Contributor

If you need write access to my repo I'd be happy to give you :-)

@ccordoba12
Copy link
Member

Don't worry @thewhitetulip, she already solved the problem :-)

@ccordoba12 ccordoba12 changed the title Shortcut to open last closed tab Add shortcut to open last closed tab Dec 7, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

5 participants