Sublime Forum

[solved] Is it possible to use keybinding to change setting globally?

#1

I want to set some keybingings to change line_padding_bottom and line_padding_top globally.

I know of set_setting, but this changes the setting only for the current buffer. Is there a way to change the setting for all buffers and have the changed value saved in my Preferences file?

Thanks!

0 Likes

#2

Yes

    {
        "keys": ["ctrl+k", "ctrl+l", "ctrl+b"], 
        "command": "set_user_setting", 
        "args": {
            "file": "Preferences.sublime-settings",
            "setting": "line_padding_bottom",
            "value": 2
        }
    },
4 Likes

#3

Thank you!

0 Likes

#4

Wow, I’ve never seen this command before. Where did you find it?

1 Like

#5

My motivation was to create a keybinding to change the spell check dictionary. So I logged the commands, while changing the dictionary via the menu and it uses that command.

5 Likes