Sublime Forum

Hotkeys for quick switch between spell checking languages

#1

To switch the spell check languages, I have to click ViewDictionaryUserDictionaries → I select a language. It takes a lot of time. How I can make hotkeys for switching of languages? Thanks.

0 Likes

#2

This menu item updates the value of the "dictionary" preference in the User preferences file, for example to "Packages/Language - English/en_US.dic"

I guess you’ll need a custom plugin that can be used to update any setting passed in as an argument, and make a keybinding that will use it…

0 Likes

#3

An example keybinding for changing the setting to english would be:

{
    "keys": ["ctrl+k", "ctrl+l", "ctrl+e"],
    "command": "set_user_setting",
    "args": {
        "file": "Preferences.sublime-settings",
        "setting": "dictionary",
        "value": "Packages/Language - English/en_US.dic"
    }
},

This command is called when clicking on the corresponding button. You can log the command if you open the console and write sublime.log_commands(True)
I wrote the KeybindingHelper package to simplify this task (you can call the command, but want to map it to a keybinding).

1 Like