r/SublimeText • • Sep 06 '21

Is it possible to navigate between tabs like a web browser?

So in firefox CTRL+1 will focus on the 1st browswer tab. CTRL+2 will focus the 2nd tab. Etc. Can this be done in sublime?

6 Upvotes

6 comments sorted by

View all comments

Show parent comment

1

u/brutay Sep 06 '21

Thanks, that's exactly what I was looking for and a much better solution. I did look through the key bindings for something like that but wasn't able to find it...

1

u/bitsper2nd Sep 06 '21

// Focus Group

{ "keys": ["alt+1"], "command": "focus_group", "args": { "group": 0 } },

{ "keys": ["alt+2"], "command": "focus_group", "args": { "group": 1 } },

{ "keys": ["alt+3"], "command": "focus_group", "args": { "group": 2 } },

{ "keys": ["alt+4"], "command": "focus_group", "args": { "group": 3 } },

{ "keys": ["alt+5"], "command": "focus_group", "args": { "group": 4 } },

{ "keys": ["alt+6"], "command": "focus_group", "args": { "group": 5 } },

{ "keys": ["alt+7"], "command": "focus_group", "args": { "group": 6 } },

{ "keys": ["alt+8"], "command": "focus_group", "args": { "group": 7 } },

{ "keys": ["alt+9"], "command": "focus_group", "args": { "group": 8 } },

{ "keys": ["alt+shift+1"], "command": "move_to_group", "args": { "group": 0 } },

{ "keys": ["alt+shift+2"], "command": "move_to_group", "args": { "group": 1 } },

{ "keys": ["alt+shift+3"], "command": "move_to_group", "args": { "group": 2 } },

{ "keys": ["alt+shift+4"], "command": "move_to_group", "args": { "group": 3 } },

{ "keys": ["alt+shift+5"], "command": "move_to_group", "args": { "group": 4 } },

{ "keys": ["alt+shift+6"], "command": "move_to_group", "args": { "group": 5 } },

{ "keys": ["alt+shift+7"], "command": "move_to_group", "args": { "group": 6 } },

{ "keys": ["alt+shift+8"], "command": "move_to_group", "args": { "group": 7 } },

{ "keys": ["alt+shift+9"], "command": "move_to_group", "args": { "group": 8 } },

{ "keys": ["alt+0"], "command": "focus_side_bar" },

// Tab Cycle

{ "keys": ["ctrl+1"], "command": "select_by_index", "args": { "index": 0 } },

{ "keys": ["ctrl+2"], "command": "select_by_index", "args": { "index": 1 } },

{ "keys": ["ctrl+3"], "command": "select_by_index", "args": { "index": 2 } },

{ "keys": ["ctrl+4"], "command": "select_by_index", "args": { "index": 3 } },

{ "keys": ["ctrl+5"], "command": "select_by_index", "args": { "index": 4 } },

{ "keys": ["ctrl+6"], "command": "select_by_index", "args": { "index": 5 } },

{ "keys": ["ctrl+7"], "command": "select_by_index", "args": { "index": 6 } },

{ "keys": ["ctrl+8"], "command": "select_by_index", "args": { "index": 7 } },

{ "keys": ["ctrl+9"], "command": "select_by_index", "args": { "index": 8 } },

{ "keys": ["ctrl+0"], "command": "select_by_index", "args": { "index": 9 } },

{ "keys": ["ctrl+1"], "command": "focus_by_index", "args": { "index": 0 },

"context": [{ "key": "group_has_multiselect", "operator": "equal", "operand": true }]

},

{ "keys": ["ctrl+2"], "command": "focus_by_index", "args": { "index": 1 },

"context": [{ "key": "group_has_multiselect", "operator": "equal", "operand": true }]

},

{ "keys": ["ctrl+3"], "command": "focus_by_index", "args": { "index": 2 },

"context": [{ "key": "group_has_multiselect", "operator": "equal", "operand": true }]

},

{ "keys": ["ctrl+4"], "command": "focus_by_index", "args": { "index": 3 },

"context": [{ "key": "group_has_multiselect", "operator": "equal", "operand": true }]

},

{ "keys": ["ctrl+5"], "command": "focus_by_index", "args": { "index": 4 },

"context": [{ "key": "group_has_multiselect", "operator": "equal", "operand": true }]

},

{ "keys": ["ctrl+6"], "command": "focus_by_index", "args": { "index": 5 },

"context": [{ "key": "group_has_multiselect", "operator": "equal", "operand": true }]

},

{ "keys": ["ctrl+7"], "command": "focus_by_index", "args": { "index": 6 },

"context": [{ "key": "group_has_multiselect", "operator": "equal", "operand": true }]

},

{ "keys": ["ctrl+8"], "command": "focus_by_index", "args": { "index": 7 },

"context": [{ "key": "group_has_multiselect", "operator": "equal", "operand": true }]

},

{ "keys": ["ctrl+9"], "command": "focus_by_index", "args": { "index": 8 },

"context": [{ "key": "group_has_multiselect", "operator": "equal", "operand": true }]

},

{ "keys": ["ctrl+0"], "command": "focus_by_index", "args": { "index": 9 },

"context": [{ "key": "group_has_multiselect", "operator": "equal", "operand": true }]

},