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

Editor: drag n' drop (movable) tabs #564

Closed
spyder-bot opened this issue Feb 16, 2015 · 38 comments
Closed

Editor: drag n' drop (movable) tabs #564

spyder-bot opened this issue Feb 16, 2015 · 38 comments

Comments

@spyder-bot
Copy link
Collaborator

From isamertg...@gmail.com on 2011-02-27T06:59:54Z

We cant move tabs or we cant change their index. If we can, it would be nice.

Best regards.

Original issue: http://code.google.com/p/spyderlib/issues/detail?id=564

@spyder-bot
Copy link
Collaborator Author

From pierre.raybaut on 2011-02-27T06:43:15Z

Because of the way the editor is designed, this is not a quick change (like simply make the editor plugin inherit from the same TabWidget class as the console plugin does).
See this other issue for more details, even if the mentioned combo box has been replaced by a button menu on the top-left corner of the widget since then: https://code.google.com/p/spyderlib/issues/detail?id=198&can=1&q=editor%20tabs I may not be completely opposed to implement this feature like I was for issue #198 .

Labels: -Type-Defect -Priority-Medium Type-Enhancement Priority-Low

@spyder-bot
Copy link
Collaborator Author

From danielst...@googlemail.com on 2011-03-22T02:35:21Z

Hi,

me, too, I'd really like to have movable tabs in the future. Maybe, instead of redesigning the editor, this could be implemented using the File List Management? Like adding Up/Down buttons as in a layer tool box?

Thanks a lot for consideration,
Daniel

@spyder-bot
Copy link
Collaborator Author

From pierre.raybaut on 2011-05-16T01:28:31Z

Labels: Cat-Editor

@spyder-bot
Copy link
Collaborator Author

From pierre.raybaut on 2011-10-06T07:50:31Z

issue #782 has been merged into this issue.

@spyder-bot
Copy link
Collaborator Author

From pierre.raybaut on 2011-10-06T07:52:41Z

Daniel: actually the design limitation is deeper than that (that's not a GUI problem)

Summary: Editor: drag n' drop (movable) tabs

@spyder-bot
Copy link
Collaborator Author

From pierre.raybaut on 2011-10-06T07:56:32Z

I think that a lot of users would be interested by this feature.

Moreover I'm tired of Editor's current design limitations/bugs. So the best is to rewrite the editor widget: https://code.google.com/p/spyderlib/source/browse/spyderlib/widgets/editor.py Redesigning the editor is not a difficult/long task, but it will require a lot of testing: debugging will take time. That's why I think we should not implement this for v2.1 but for the next release.

Status: Accepted
Owner: pierre.raybaut
Labels: Milestone-Release2.2

@spyder-bot
Copy link
Collaborator Author

From pierre.raybaut on 2011-10-18T12:57:28Z

We shall write a generic horizontal/vertical splitting tab widget (let's call it SplittableTabWidget) so that it can be used for both Editor and Console (see issue #804 ):

  • child widgets will be added to QTabWidget objects
  • any kind of child widget may be added to it
  • when creating a new area by splitting vertically or horizontally, a spacer widget (derived from a QTabWidget of course) will be inserted with optional buttons and/or context menu to perform an initial action (e.g. "open an interpreter" for the Console or "open a script" for the Editor)
  • tabs will be moveable from a QTabWidget to another
  • maybe using QSplitter like in current editor's implementation is the not the best idea: see this thread ( http://comments.gmane.org/gmane.comp.lib.qt.general/22146 )

@spyder-bot
Copy link
Collaborator Author

From pierre.raybaut on 2012-03-11T06:21:10Z

issue #939 has been merged into this issue.

@spyder-bot
Copy link
Collaborator Author

From pierre.raybaut on 2012-03-18T13:45:19Z

Labels: -Milestone-Release2.2 Milestone-v2.2

@spyder-bot
Copy link
Collaborator Author

From pierre.raybaut on 2012-03-18T13:56:59Z

Labels: -Milestone-v2.2 MS-v2.2

@spyder-bot
Copy link
Collaborator Author

From pierre.raybaut on 2012-03-18T14:15:49Z

Labels: -Type-Enhancement Type-Enh

@spyder-bot
Copy link
Collaborator Author

From nbigaoue...@gmail.com on 2012-11-08T09:19:38Z

What is the status of this?
I find this (and the fact that ctrl+tab & ctrl+shift+tab can't be changed to the ctrl+pageup & ctrl+pagedown behaviour) quite annoying...
Thanks.

@spyder-bot
Copy link
Collaborator Author

From pierre.raybaut on 2012-11-08T12:22:45Z

I'm afraid that nothing has been done on this for a year now.
I'll take care of it when I can... It's not complicated but it could take some time to reimplement all the editor features: there are a lot of things to manage at this design level.

Regarding the behavior of Ctrl+Tab and Shift+Ctrl+Tab, I've reproduced the standard behavior of these shortcuts (see an Internet navigator tabs, like Chome for example): that's navigating through tabs (next/previous) and not simply going to the first tab to the right/to the left.

@spyder-bot
Copy link
Collaborator Author

From nbigaoue...@gmail.com on 2012-11-09T08:43:39Z

Hi Pierre,

What has to be done for the editor stuff? As I understand it, the whole editor widget has to be re-written? I guess it's a lot... What is your guess as to what it should be re-written with? Different parent class? If I want to hack on it, where should I begin?

Correct me if I'm wrong, but I though historically ctrl+tab and ctrl+shift+tab would navigate to the tab on the right or left, respectively. This was ignoring the "history" of tabs; ctrl+tab would always go to the tab on the right, even if another tab was previously selected. Then at some point people started wanting a behaviour similar to "alt+tab" where, in this case, the last window to have focus was raised. Pressing "alt+tab" twice would go to the next window and back to the first, without cycling through all others. I have found that feature interesting and tried it when KDevelop added it. I didn't like it though as I had trouble remembering the history of the tabs; what I see is the tabs opened in a specific order. If a tab I need to access is two on the right, I know right away that I have to press ctrl+tab twice and I'll be there. Using a history based behaviour, this breaks. ctrl+pagedown has the behaviour I need/want, but this requires having two hands on the keyboard, while ctrl+tab & ctrl+shift+tab can be done with only one. Additionally, on my netbook the pagedown is hidden behind a Fn key...

KDevelop can be used with both the history-based behaviour and the traditional one. I was surprised that it was not possible at all in spyder; ctrl+tab and ctrl+pageup are not interchangeable. I guess the simplest solution would be to expose both of these behaviour in the preferences so user can switch the two.

I'm not sure I understood your last paragraph. On every browser I've used, ctrl+tab will go to the tab on the right, ctrl+shift+tab on the left. On both linux and windows, with both firefox and chrome/chromium. I don't know of any browser that implements ctrl+tab as cycling through history and not "visual" ordering... ctrl+pagedown is doing the visual order in browsers too; it's consistent with spyder.

@spyder-bot
Copy link
Collaborator Author

From pierre.raybaut on 2012-11-09T12:27:31Z

There is a lot to do indeed... I should write at least the architecture so that you may eventually, if you want to, continue and implement the rest of the features.

Regarding the behavior of the ctrl+tab and ctrl+shift+tab in Chrome (or any other internet navigator), I don't know why I was sure that they were following a history-based behavior... (maybe because I'm never using them!) they don't, as you rightfully pointed out :)

@spyder-bot
Copy link
Collaborator Author

From pierre.raybaut on 2013-01-27T01:43:28Z

Labels: -MS-v2.2 MS-v2.3

@spyder-bot
Copy link
Collaborator Author

From pierre.raybaut on 2013-03-23T03:47:58Z

issue #1330 has been merged into this issue.

@spyder-bot
Copy link
Collaborator Author

From kram...@gmail.com on 2013-04-06T04:15:28Z

Just wanted to add that I would also really really appreciate this feature!

@spyder-bot
Copy link
Collaborator Author

From pierre.raybaut on 2013-05-11T05:32:06Z

Labels: -MS-v2.3 MS-v2.4

@spyder-bot
Copy link
Collaborator Author

From gabrielp...@gmail.com on 2013-07-18T09:27:11Z

Moving tabs around can become quite necessary for your workflow when you have several open. I got used to being able to move tabs around while coding with Canopy and Geany and not being able to with Spyder (which I consider the best Python IDE) is really a shame.
Hopefully we'll get this implemented soon. Best.

@spyder-bot
Copy link
Collaborator Author

From techtonik@gmail.com on 2013-07-18T10:37:33Z

It is possible to speed up the process by researching and documenting:

  1. current behavior
  2. what is required to change tabs to be movable
  3. what will break after the change

@spyder-bot
Copy link
Collaborator Author

From hikaru.y...@gmail.com on 2014-05-15T08:27:52Z

at least where is the list of editor tabs (opened files) in config file, so we can arrange manually through text editor even though we have to close and reopen spyder to apply the settings.

@spyder-bot
Copy link
Collaborator Author

From hikaru.y...@gmail.com on 2014-05-15T08:43:55Z

Ok, I just found it under variable 'filenames' in .spyder.ini (didn't read carefully when I opened this file before). But after changed var filenames, I can't run Spyder. Is there any workaround for this arranging problem?

@spyder-bot
Copy link
Collaborator Author

From ccordoba12 on 2014-11-18T15:01:11Z

issue #2013 has been merged into this issue.

@ccordoba12 ccordoba12 modified the milestones: v3.0, v3.0beta4 Jan 27, 2016
@ccordoba12 ccordoba12 modified the milestones: v3.0beta4, v3.0rc1 Apr 25, 2016
@ccordoba12 ccordoba12 modified the milestones: v3.0beta4, v3.0rc1 Jun 9, 2016
@ccordoba12 ccordoba12 modified the milestones: v3.1, v3.0beta5 Jul 23, 2016
@ccordoba12 ccordoba12 assigned rlaverde and unassigned goanpeca Nov 16, 2016
@ccordoba12
Copy link
Member

ccordoba12 commented Nov 16, 2016

@rlaverde, please look at Gonzalo's work on PR #2372 and finish it.

@rachel-elas-ai
Copy link

rachel-elas-ai commented May 9, 2017

This has been marked as done but in no spyder version (I have the latest and have been trying for a year) can I rearrange the tab order for the files I have open. How can I do it? (It's made particularly annoying by the fact that when I open files, they don't open in the tab bar in alphabetical order or with the most recently opened last, but in some strange, unidentifiable order that can mean two files loaded back-to-back are several tabs apart in no discernible order.)

@eliot1785
Copy link

I would also like to be able to do this. There doesn't seem to be a drag-and-drop feature.

@ccordoba12
Copy link
Member

This was already fixed and it will be available in Spyder 3.2 (not released yet).

The Milestone tag on the right of each issue keeps track of the Spyder version an issue was (or will be) fixed.

@eliot1785
Copy link

Ah I see. Sorry I missed that. Thanks!

@tfetherolf
Copy link

When I have two editors open with Spyder 3.2 (MacOS X version), I can rearrange the tabs in either window. When I do this with say editor 1, the filename tab order will update on both editors, but editor 2 will not update the actual file in that location. So in editor 1 I will change the order to File2, File1, File3, then editor 2 will show the tab order as File2, File1, File3--but the contents of editor 2 are still File1, File2, File3. Also, if I am editing the contents of File2 in editor 2 (labeled File1), File2 will not save until I switch to the tab labeled File2 in either editor--regardless of the file contents shown. However, the file does save correctly. A restart of Spyder fixes the labeling problem, but any rearrangement of the tabs has the same effect.

@ccordoba12
Copy link
Member

@tfetherolf, we noticed that after fixing this issue. Hopefully, that problem will be fixed in our 3.2.5 version, to be released in a couple of days.

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

9 participants