Change appearance in sublime text 3 when switching mode in Vintage

Viewed 647

Is it possible to change some part of the editor's appearance when switching between command mode and insert mode in Vintage?

By default, when I switch modes, sublime only shows the text COMMAND MODE and INSERT MODE in the status bar. This is too small for more. I'm looking for something more obvious like this question: vim: change the status line color in insert mode, but in Sublime

1 Answers

The following command will update the current view color scheme on insert/normal mode changes.

Obviously you wouldn't want to just toggle solarized light/dark when the vim mode changes, but the following example command should give you an idea of the possibilities.

class OnVimModeChange(sublime_plugin.EventListener):

    def on_post_text_command(self, view, name, args):
        if view.settings().get('command_mode'):
            view.settings().set('color_scheme', 'Packages/Color Scheme - Default/Solarized (Dark).tmTheme')
        else:
            view.settings().set('color_scheme', 'Packages/Color Scheme - Default/Solarized (Light).tmTheme')
Related