AutoIt / SublimeAutoItScript

AutoItScript Au3 language package for SublimeText including syntax highlighting, comments toggling, auto-completions, build systems for run and compile, Tidy command, IncludeHelper command.
https://www.autoitscript.com/forum/forum/7-autoit-technical-discussion/
MIT License
29 stars 11 forks source link

Change key bindings #34

Closed kien5436 closed 5 years ago

kien5436 commented 5 years ago

Since Alt + any key will invoke the menubar function, is there any way to change the key bindings?

FichteFoll commented 5 years ago

The package does not define a keymap. The command to run tidy is called autoittidy (other commands can be found in the plugin file based on the class names: https://github.com/AutoIt/SublimeAutoItScript/blob/1.3.6/autoitbuild.py).

kien5436 commented 5 years ago

I don't know about Python, I only want to change key bindings. As I can see in the .py file, I guess sublime_plugin.WindowCommand will be invoked but don't know how to change this :/

FichteFoll commented 5 years ago
  1. Open Preferences > Key Bindings
  2. Insert this on the right side:
[
    { "keys": ["alt+t", "t"], "command": "autoittidy" },
]

(If you already have a list there, only add the object line.)

kien5436 commented 5 years ago

Thank you! It works :D