doesn’t work does it matter what I named the saved file? just doesn’t work with shortcut at all…
[quote=“skuroda”]As a side note, you can create Stylus.sublime-settings in your user directory so you don’t have to edit the installed package. This holds true for any user specific settings. Now onto your original question.
This can be done easily with a plugin. First, create a new plugin (in the menu select Tools -> New Plugin). Paste the following code and save. This should be saved in your user directory. You may name the file whatever you want, just ensure it is saved as a python file.
[code]import sublime_plugin
class ToggleDrawWhiteSpaceCommand(sublime_plugin.TextCommand):
def run(self, edit):
settings = self.view.settings()
setting = settings.get(“draw_white_space”)
if setting == “all”:
settings.set(“draw_white_space”, “none”)
else:
settings.set(“draw_white_space”, “all”)
[/code]
Next, add the following to your user keybinding (Accessible through Preferences -> Key Bindings - User) and add the following
{ "keys": "f12"], "command": "toggle_draw_white_space" }
Of course, you can change the keybinding to whatever you want.[/quote]