How to fix Ctrl-Tab behavior in Kate?

Kate has tabs turned off by default (at least that’s what you get with vanilla Kate package from Arch Linux repositories) and even when you turn them on, they act kinda funky because Kate switches between tabs by name order, rather than by opening order so what happens is that Ctrl-Tab starts jumping between your tabs instead of going from one to another, from left to right. That was quite confusing to me, and I wanted to change that behavior to what I’m already used to in browsers, GEdit, Pidgin, whatever… Finding a solution (a very well camouflaged one for that matter, thank you) to this situation was rather… unexpected.

To turn tabs on (if they’re not turned on by default in your distro) you will first have to go to Settings -> Configure Kate -> Plugins and turn on either “Tab Bar” or “Multiline Tab Bar”. Try both and then decide which one suits you better. After that you will have to set up the shortcut for switching between tabs. To do that, go to Settings -> Configure Shortcuts¬†and set the shortcut for Forward to Ctrl-Tab. You could as well set up alternate shortcuts: Alt+1 for Back and Alt+2 for Forward. You will be able to toggle tabs in both directions then easily.

To fix the tab switching behavior (ordering), open the Documents column from the File System Browser (if you have it turned off, turn it on under plugins), right-click on it and choose Opening Order from Sort By in the drop-down menu.

That’s it, enjoy!