Created
May 4, 2013 02:06
-
-
Save renechz/5515753 to your computer and use it in GitHub Desktop.
Enter Command Mode on save in Sublime Text.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Vintage mode should be active first. | |
# Remove Vintage package from the ignored_packages setting in your User preferences. | |
# "ignored_packages": [""] | |
# | |
# Then you just have to create a fairly simple plugin. | |
# Go to Tools > New Plugin. | |
# Save it under Packages/User/enter_command_mode_on_save.py and you're ready to go! | |
import sublime, sublime_plugin | |
class EnterCommandModeOnSave(sublime_plugin.EventListener): | |
def on_pre_save(self, view): | |
# Activate it on your User preferences | |
if view.settings().get("enter_command_mode_on_save") == True: | |
view.run_command("exit_insert_mode") | |
view.run_command("exit_visual_mode") |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment