Sublime Forum

changing keybinding at st4

#1

Hello everyone, I’m using the latest build of st4 (4192)

I’m trying to change the key bindings for changing tabs, I go the targeted way: settings -> key bindings

I enter the text on the right, save

[
{ “keys”: [“ctrl+tab”], “command”: “next_os_tab” },
{ “keys”: [“ctrl+shift+tab”], “command”: “prev_os_tab” },
]

but nothing happens, the combination does not work
I tried to enter conflicting combinations also in the custom list and swap the key combinations, it did not help - ctrl+tab does not execute next_os_tab

what could I have done wrong?
03

0 Likes

#2

Are you sure you’re using native tabs? "next_os_tabs" does not switch between files.

0 Likes

#3

okay, so I need next_view and prev_view?

default keys -

{ "keys": ["super+alt+left"], "command": "prev_view" },
{ "keys": ["super+alt+right"], "command": "next_view" },

they do what I need, so in my custom bindings I did this:

[
{ “keys”: [“ctrl+tab”], “command”: “next_view” },
{ “keys”: [“ctrl+shift+tab]”], “command”: “prev_view” },
]

and the same way as first one i cant switch by pressing this keys, BUT if I do it like this, everything immediately starts working the same way as it says in the configuration:

[
{ “keys”: [“ctrl+tab”], “command”: “prev_view” },
{ “keys”: [“ctrl+shift+tab]”], “command”: “next_view” },
]

it turns out that there is a difference in which order the bindings are written? however, I still can’t achieve the behavior where ctrl+tab will toggle forward and ctrl+shift+tab back.

maybe someone has a ready-made configuration for this? I have a feeling that this customization mechanism is broken

0 Likes

#4
[
    { "keys": ["ctrl+tab"], "command": "next_view" },
    { "keys": ["ctrl+shift+tab"], "command": "prev_view" },
]

This works and is what I’ve got in my own keybindings. In the code you posted you have an extra ] in [“ctrl+shift+tab]”], which would make it stop working.

0 Likes

#5

thank you very much! sorry, i really didnt notice this extra character :slight_smile:

0 Likes