Home Download Buy Blog Forum Support

Switching tabs with keyboard

Switching tabs with keyboard

Postby CWIZO on Tue Oct 27, 2009 8:48 am

I just upgraded to the latest version of Sublime Text. And now I have a problem with "ctrl+tag" or "ctrl+alt+tab". I can't predict which tab I'll get after hinting the keyboard. I suppose it's using some "smart" way to switch with the recent tabs I used but I'd like the old functionality back where tabbing just went in the order the tabs are displayed. But I can't find anything in the settings to change this.
Does anybody have an idea on how to do this?
CWIZO
 
Posts: 12
Joined: Tue Oct 27, 2009 8:45 am

Re: Switching tabs with keyboard

Postby protoplasm on Tue Oct 27, 2009 8:59 am

You can use CTRL+PAGE UP or CTRL+PAGE DOWN to always go in tab order, rather than recently used order.

There may be another, easier way, but if you wanted to change that behaviour you could edit your default key bindings and switch the bindings around?
protoplasm
 
Posts: 23
Joined: Tue Oct 20, 2009 4:47 pm

Re: Switching tabs with keyboard

Postby CWIZO on Tue Oct 27, 2009 1:00 pm

cheers mate, that was it. I forgot to look in the key-bindings.

If somebody else has the same "problem":
put this into your "User Key bindings" file (menu Preferences -> User Key bindings):

<binding key="ctrl+tab" command="nextView"/>
<binding key="ctrl+shift+tab" command="prevView"/>

(between the <bindings></bindings>)
CWIZO
 
Posts: 12
Joined: Tue Oct 27, 2009 8:45 am

Re: Switching tabs with keyboard

Postby EJ12N on Tue Oct 27, 2009 9:19 pm

CWIZO wrote:cheers mate, that was it. I forgot to look in the key-bindings.

If somebody else has the same "problem":
put this into your "User Key bindings" file (menu Preferences -> User Key bindings):

<binding key="ctrl+tab" command="nextView"/>
<binding key="ctrl+shift+tab" command="prevView"/>

(between the <bindings></bindings>)


Yup I did this too when it came out with the new selection system, I mean in all tabbed applications I have used (ie: firefox) in windows ctrl+tab moves forward ctrl+shift+tab moves backwards...

I think this should be default but oh well at least we always have the ability to customize however we want it :D
EJ12N
 
Posts: 281
Joined: Tue Apr 21, 2009 5:23 pm

Re: Switching tabs with keyboard

Postby nick. on Wed Jan 18, 2012 2:40 pm

For users looking to make this change in Sublime Text 2, note that the command has changed to "next_view" and "prev_view", so add the following to your user keybindings:
Code: Select all
{ "keys": ["ctrl+tab"], "command": "next_view" },
{ "keys": ["ctrl+shift+tab"], "command": "prev_view" }
nick.
 
Posts: 266
Joined: Wed Jan 18, 2012 3:45 am

Re: Switching tabs with keyboard

Postby wsdookadr on Tue Mar 26, 2013 10:08 pm

is there a way to move tabs left and right with the keyboard ?
wsdookadr
 
Posts: 2
Joined: Tue Mar 26, 2013 9:55 pm

Re: Switching tabs with keyboard

Postby quodlibet on Wed Mar 27, 2013 9:16 am

I use this one:
https://github.com/SublimeText/MoveTab

It seems compatible with ST3 as well.

This is quite the zombie thread isn't it?

Hope this helps,
Alex
quodlibet
 
Posts: 543
Joined: Sat Jun 18, 2011 5:53 pm

Re: Switching tabs with keyboard

Postby aspect_mkn8rd on Tue Jul 01, 2014 5:28 am

nick. wrote:For users looking to make this change in Sublime Text 2, note that the command has changed to "next_view" and "prev_view", so add the following to your user keybindings:
Code: Select all
{ "keys": ["ctrl+tab"], "command": "next_view" },
{ "keys": ["ctrl+shift+tab"], "command": "prev_view" }


thx a lot! works like a charm in #st3
aspect_mkn8rd
 
Posts: 2
Joined: Sun Aug 18, 2013 7:11 am

Re: Switching tabs with keyboard

Postby EmilBeBri on Tue Aug 19, 2014 4:08 pm

I get an error when doing this - the file "Default (Windows)-sublime-keymap-User" file is empty. when I paste either this:

Code: Select all
{ "keys": ["ctrl+tab"], "command": "next_view" },
{ "keys": ["ctrl+shift+tab"], "command": "prev_view" }


I get a warning saying "Error trying to parse file: Unexpected trailing characters in Packages\User\Default (Windows).sublime-keymap:1:49

It's sublime text 3 - what's the prob I wonder?
EmilBeBri
 
Posts: 1
Joined: Tue Aug 19, 2014 4:04 pm

Re: Switching tabs with keyboard

Postby bizoo on Tue Aug 19, 2014 4:42 pm

Missing square brackets, must be:
Code: Select all
[
  { "keys": ["ctrl+tab"], "command": "next_view" },
  { "keys": ["ctrl+shift+tab"], "command": "prev_view" }
]
bizoo
 
Posts: 886
Joined: Wed Dec 08, 2010 6:53 am
Location: Switzerland

Next

Return to Technical Support

Who is online

Users browsing this forum: Exabot [Bot] and 31 guests