#351 MRU (Most Recently Used) tabs

open
nobody
None
5*
2013-01-09
2012-10-26
Anonymous
No

I download TeXstudio and finally thought I had found the perfect tex editor: so many awesome features and functionality! There's just one thing missing for me: MRU (Most Recently Used) tabs or sometimes called stacked tabbing.

If you are unfamiliar with MRU tabs, look at how TeXnicCenter, Codelite or Code::Blocks do the tabbing: there's a list kept of the most recently used tabs and when you hit ctrl-tab, you go to the most recently used one (before the current tab of course). If you hold ctrl and hit tab again, you go to the second MRU one, etc. That tab now goes to the top of the stack

Example with 5 files A, B, C, D, E (* means current file and top of the stack)

stack at start:
A*
B
C
D
E

then, after ctrl-tab:
B*
A
C
D
E

then, after ctrl-tab again:
A*
B
C
D
E

then, after ctrl-(tab+tab):
C*
A
B
D
E

So the implementation just requires to keep track of one stack and after a switch of documents it moves that document to the top of the stack.

I hope this was understandable and that you have some time to make this. I would immediately switch to TeXstudio!

Discussion

  • Tim Hoffmann

    Tim Hoffmann - 2012-10-27

    I tested this function in TeXnicCenter. However I'm not really convinced of it. We use Ctrl+Tab/Ctrl+Shift+Tab to navigate forward/backward through the list of open tabs, like it is done in web browsers. That should stay the default.

    In my view, this function is a rather a very rough version of navigation through the history than a navigation through the list of open tabs. As such, I propose to rather make it part of the cursor history (i.e. add an entry to the cursor history when switching tabs).
    Advantages:
    - The cursor history is already available, so implementation is trivial
    - It follows the logic of last editing points, which is more intuitive than that of last used tabs
    - We keep separate logic between pure forward/backward navigation of tabs and navigation in history
    Only possible drawback:
    - This history is more fine-grained. So if you really want the functionally "go back to second most recent used tab", you maybe have to hit "back" more than twice.

     
  • Anonymous - 2012-10-27

    Thanks for your reply,

    I do not wish to have it enabled by default per se. Just the option of it being there is perfect for me. :-)

    Cursor history may be interesting, I will check that out when I have time, thanks for the suggestion. It is indeed something different (though similar) and still I would definitely like the MRU tab switching. Having to press a key twice limits my productivity greatly, as I frequently type in usually two tabs and use ctrl-tab to quickly switch between them. Other times I use another tab for reference in comments, e.g. a list of things I want, or a sketch of the document. Copying this to all other tabs is not an option. Altering the tab order manually is no option either, as the tabs I work in often change.

     
  • Anonymous - 2012-11-13

    Sorry to pertrude, but is there any intention on adding this option? Otherwise I'll continue my search.

     
  • Sandokansan

    Sandokansan - 2012-11-13

    I think there's something wrong with this bugtracker, I realise I am not seeing all the comments. It says at the top there should be 5, but I only see my two and Tim's. Apologies for any possible confusion. Does anyone know how I can fix this?

     
  • Benito van der Zander

    but is there any intention on adding this option?

    Yes.

    The intention is there, but not the time...

    (Although I would prefer to add a file selection list where you can type a part of the filename to jump to it, like in the Firefox address bar )

    says at the top there should be 5, but I only see my two and Tim's.

    That are all that were there.

    However NOW there are five comments.

     
  • Sandokansan

    Sandokansan - 2012-11-14

    Regarding the comments: strange. it indeed now reads 5 for me as well.

    Very neat that the intention is there, thanks. I will be patiently awaiting the update. :-)

    The goto-file feature you mention is indeed something I am missing from most IDEs I use and would be a great addition (shortcut ctrl-shift-g comes to my mind, staying close to goto-line ctrl-g and adding the shift like in ctrl-shift-f because it applies to all files; but those are details, just thinking out loud). It's not a proper replacement for MRU tabs, but a useful feature nonetheless.

    I like that you guys are still adding features even though the IDE seems very complete as it stands!

     
  • Benito van der Zander

    • Priority: 1 --> 5*
     
  • Benito van der Zander

    Ok, I have added something similar.

    In the View menu there is now an entry "list of open documents" which opens a list of, well, the open documents (you probably want to assign a shortcut to it). Sorted in MRU order, if the corresponding option on the first config page is set.

    However, it deviates a little bit from the usual behavior. Let's say, you have assigned the shortcut X to it, then you can open the previously used document by pressing X, Enter.
    And the document used before that by pressing X, Arrow down, Enter. And the one before that, by pressing X, Arrow down, Arrow down, Enter...

    That might be a little bit slower, but the new feature is also way more powerful. Because, if you have a file foobar.tex open, you can also press X, f, o, o, Enter and it opens that foobar.tex. (more precisely, the last used file containing foo in its name) I think that is easier to use if you have many files open, with the MRU list of Qt Creator, I'm always lost as soon as I have more than 3 files...

    And you can also write foo:100 to jump to line 100 of the foobar file.
    And even write foo:100;17 to jump to line 100, column 42. (although the ; is difficult to type, perhaps change it to 100,42 ?)

     
  • Sandokansan

    Sandokansan - 2013-01-09

    Thanks for the feature, being able to type the start of the file is really handy. I am looking at the menu items in the view menu, but I am unsure how to use it. You mention that I need to set a shortcut to "it", what is "it"? I am using 2.5.2r3661.

    Having this as a basis seems to allow implementing MRU tabbing using ctrl-tab with relative ease. Is this something you would be interested in adding as well?

     

Log in to post a comment.

Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:





No, thanks