I want to be able to use a hotkey to enable/disable anaconda linting. Its really inconvenient to have to open the settings whenever I had to use it. I'm new to Sublime Text but from what I see at the Keybindings, you can pass a variable with the args. For example:
[{"keys": ["ctrl+q"], "command": "toggle_comment", "args": {"block": false}}]
So, I was thinking, maybe there's a command to change package "settings - user" and pass a var to set ["anaconda_linting": false,] into true or false?
You can do this with a custom plugin and keybinding. Select
Tools → Developer → New Plugin…
and set the contents of the file that opens to this:Hit CtrlS to save, and your
Packages/User
folder should open up. Save the file astoggle_anaconda_linting.py
.Now, open up your keybindings and add the following between the
[ ]
characters (choosing whatever shortcut you want):Now, whenever you hit the shortcut,
"anaconda_linting"
will be toggled for all files.