Add ctrl shift q toggle_draw_whitespace.
This commit is contained in:
parent
dbd742eafe
commit
5306bd2f5d
2 changed files with 18 additions and 0 deletions
|
|
@ -1,6 +1,7 @@
|
||||||
[
|
[
|
||||||
{ "keys": ["ctrl+shift+c"], "command": "toggle_setting", "args": {"setting": "draw_centered"}},
|
{ "keys": ["ctrl+shift+c"], "command": "toggle_setting", "args": {"setting": "draw_centered"}},
|
||||||
{ "keys": ["ctrl+shift+w"], "command": "toggle_setting", "args": {"setting": "word_wrap"}},
|
{ "keys": ["ctrl+shift+w"], "command": "toggle_setting", "args": {"setting": "word_wrap"}},
|
||||||
|
{ "keys": ["ctrl+shift+q"], "command": "toggle_draw_whitespace"},
|
||||||
{ "keys": ["ctrl+shift+m"], "command": "toggle_minimap"},
|
{ "keys": ["ctrl+shift+m"], "command": "toggle_minimap"},
|
||||||
{ "keys": ["ctrl+shift+b"], "command": "expand_selection", "args": {"to": "brackets"} },
|
{ "keys": ["ctrl+shift+b"], "command": "expand_selection", "args": {"to": "brackets"} },
|
||||||
{ "keys": ["ctrl+shift+n"], "command": "clone_file" },
|
{ "keys": ["ctrl+shift+n"], "command": "clone_file" },
|
||||||
|
|
|
||||||
17
voussoir/toggle_draw_whitespace.py
Normal file
17
voussoir/toggle_draw_whitespace.py
Normal file
|
|
@ -0,0 +1,17 @@
|
||||||
|
'''
|
||||||
|
Thank you facelessuser
|
||||||
|
https://forum.sublimetext.com/t/keybinding-draw-white-space-toggle/5122
|
||||||
|
'''
|
||||||
|
import sublime
|
||||||
|
import sublime_plugin
|
||||||
|
|
||||||
|
class ToggleDrawWhitespaceCommand(sublime_plugin.TextCommand):
|
||||||
|
def run(self, edit, options=["selection", "all"]):
|
||||||
|
try:
|
||||||
|
current = self.view.settings().get("draw_white_space", "selection")
|
||||||
|
index = options.index(current)
|
||||||
|
except:
|
||||||
|
index = 0
|
||||||
|
|
||||||
|
index = (index + 1) % len(options)
|
||||||
|
self.view.settings().set("draw_white_space", options[index])
|
||||||
Loading…
Reference in a new issue