elicwhite / ESLint-Formatter

Sublime Text 3 Plugin to Autoformat with Eslint
MIT License
139 stars 20 forks source link

How can we update the key binding? #24

Closed slashwhatever closed 8 years ago

slashwhatever commented 8 years ago

What command do we need to add to our Key Bindings file to change the default keyboard shortcut?

elicwhite commented 8 years ago

screen shot 2016-10-08 at 4 07 24 pm

slashwhatever commented 8 years ago

I should have been more clear - what's the string we need to use for the command in the key binding in order to update it?

I know where the key binding settings are in Sublime :)

elicwhite commented 8 years ago

Hmm. I'm still not sure what you are asking. Are you asking what the format is to specify the keys required to press? Like super+6?

slashwhatever commented 8 years ago

Sorry I'm not explaining myself very well :)

Here's and example keybinding for refreshing my folder list. I've set mine to "super+shift+r"

{ "keys": ["super+shift+r"], "command": "refresh_folder_list" },

In order to change the default key stroke for ESLint formatter, I don't know what the value of key "command" needs to be.

elicwhite commented 8 years ago

Gotcha. If you follow the key binding settings from my screenshot and click on Key Bindings - Default, the content of the default bindings is:

[{
  "keys": ["super+shift+h"],
  "command": "format_eslint"
}]

That is the command you are looking for.