The ability to see all whitespace (spaces, tabs, etc) is not very clear in sublime and not easily accessible.

You can change it by doing this:

Open your user settings (Preferences -> Settings) and add this item in to your settings in between the { and }.

Make sure to properly end it with a comma if its not the last item in the dict, and if it is the last item in the dict, you can remove the final comma character.

"draw_white_space": "all",

However, you easily set yourself some keyboard shortcuts by editing the keymap (Preferences -> Key Bindings). Note put this in between your [ and ] and characters (They keybindings is a list of dicts with keys of “keys”, “command” and “args”).

Likewise, make sure to remove the comma at the end if its the last item and keep it if you have further items in there.

{ "keys": ["shift+alt+d"], "command": "set_setting", "args":
{
"setting": "draw_white_space",
"value": "all"
}
},
{ "keys": ["shift+alt+a"], "command": "set_setting", "args":
{
"setting": "draw_white_space",
"value": "selection"
}
},

Shift+Alt+D to show all whitespace

Shift+Alt+A to revert to normal

On a MAC replace Alt with Option key

Sidenote: My key bindings so far are simple so its just:

[
{ "keys": ["shift+alt+d"], "command": "set_setting", "args":
{
"setting": "draw_white_space",
"value": "all"
}
},
{ "keys": ["shift+alt+a"], "command": "set_setting", "args":
{
"setting": "draw_white_space",
"value": "selection"
}
}
]

Leave a Reply

Your email address will not be published. Required fields are marked *