MRU tab switching


#1

Ctrl-tab and Ctrl-Shift-tab move right and left between the tabs. Cmd-Shift-[ and Cmd-Shift-] do this, as well.

I think it would be useful if (Shift-)Ctrl-tab could move in MRU order rather than in visual order.


#2

I think this is a duplicate of this older topic …

Maybe a terminology difference and a different key combination, but essentially the same.


#3

+1 for adding this option in Settings


#4

+1

And it should display a small list to show switching files (like Windows Alt+Tab list or IntelliJ IDEA)


#5

Like the Fuzzy Finder: Toggle Buffer Finder command? Cmd+Bby default on OS X.


#6

Fuzzy Finder is less efficient than ctrl+tab, it needs Up/Down keys to cycle items, a Enter to confirm switching, and displays files not currently opened.


#7

The Buffer Finder command only shows files that are currently open, which is why I mentioned it. But yes, it does suffer the other inefficiencies. On the other hand, it allows you to simply type a few characters of the file name to jump straight to it in the list … which is why some prefer it to Ctrl+TAB style selection schemes.


#8

I wrote a little MRU code for vim-mode: https://github.com/bronson/vim-mode/blob/c4182a7c716af7021eb00e210518008a93a855b8/lib/motions/pane-motion.coffee#L9-L13

Could be the basis of an MRU plugin.

This code just switches to the most recently used tab, but it doesn’t seem too hard to extend it to roll backward and forward through the MRU list. (Of course, if you activate a TextEditor, that will change its lastOpened time and change the MRU order… When the plugin is activated, it should probably save the MRU order of all the TextEditors so it doesn’t change while you’re navigating)

Happy to answer questions, comment on github if I’m not responsive here.