Show/Hide meta characters

Asked

Viewed 446 times

0

How I would do to with one click change the display of meta characters in the sublime?

1 answer

0


Using a answer I found on the internet, through a plugin:

1st Step :

Tools->New Plugin...

Paste the following code:

import sublime, sublime_plugin

class ToggleWhiteSpaceCommand(sublime_plugin.ApplicationCommand):
    def run(self):
        settings = sublime.load_settings("Preferences.sublime-settings")
        white_space = "selection" if settings.get("draw_white_space", "selection") != "selection" else "all"
        settings.set("draw_white_space", white_space)
        sublime.save_settings("Preferences.sublime-settings")

Save as toggle_white_space.py. (It may be another name, but it will influence step 2).

Step 2 :

Preferences->Key Bindings - User

Add a line with

{ "keys": ["ctrl+shift+'"], "command": "toggle_white_space" },
            ^ Keys a serem precionadas  ^ Nome do arquivo a ser executado
              para ativar o comando

Browser other questions tagged

You are not signed in. Login or sign up in order to post.