+10

Create new tab next to previous tab when opening files from sidebar

mrmachine 13 лет назад обновлен msvilans 12 лет назад 1
If I currently have 10 tabs open and I'm editing the middle one, then I click on another file that is not currently open in the sidebar and then close it, focus goes back to previous (middle) tab.

If I start editing the file, save it or open it with a double click, a new tab is created for it at the end of the tab stack. If I close that tab, focus goes to the last tab on the stack instead of the tab that previously had focus.

If I open a new file with "File > New File" from the menu, it opens a new tab immediately after the tab that currently has focus intead of at the end of the tab stack.

This can make it easy to lose your place and forces you to hunt for the tab you were previously editing, if you need to open an existing file, make a change, and then return to the current file.

I'd like this to be more consistent in remembering your previous tab. New tabs should be created adjacently to the tab that currently has focus, regardless of how they are created. With this change, you would be able to open an existing file, make a change, save it and then either close the file or use the keyboard shortcut for "File > Switch File > Previous File" to get back to the previous file.
+3

I agree this would be a useful feature.


I work with lots of open C++ files, and it's sometimes tricky when tabs for newly opened files show up at the far right of the tab group.


Taking mrmachine's suggestion a little bit further:


  • There should be a new field in the preferences that lets you control the positioning of newly opened tabs
    • The field should be called something like "new_tab_position"
  • Possible options should include:
    • "right_end" - current behaviour, where new tab appears at far right end of tab group
    • "left_end" - new tab appears at far left of tab group
    • "right_of_current" - new tab appears to the right of the currently focused tab
    • "left_of_current" - new tab appears to the left of the currently focused tab
  • Another new field in the preferences should be "switch_to_new_tab"
    • This one would be true or false, and if true, the focus would switch to a newly opened tab. If false, focus would remain unchanged when a new tab is opened.
    • Today I had a few cases where this would have been useful. I had about a dozen files open (in 2 column view). While working on a bit of code, I used Ctrl+P to open some files I went, because they also required some changes due to changes I was making in the current file. It would have been good to have these files pop up to the right of the current tab, but have the focus remain on the current tab, so I wouldn't have to use the mouse to switch the focus back each time interrupting the work flow.


This would be a "nice to have" feature, because Simple Text 2 is already a phenomenal tool!


Thanks & best regards

Markus



Сервис поддержки клиентов работает на платформе UserEcho