lkcampbell / brackets-indent-guides

A Brackets extension to show indent guides in the code editor
149 stars 34 forks source link

Add my own shortcut key #20

Closed bobrocke closed 9 years ago

bobrocke commented 9 years ago

If I want to add my own shortcut to toggle the display of indent guides, is there a command I can target? Something like view.toggleIndentGuide?

lkcampbell commented 9 years ago

The command id is lkcampbell.toggleIndentGuides. But, really, what I need to do is add the shortcut key back in again now that customized key mapping is available. Long, long ago, when this extension was first created, we didn't have customized key mapping and I removed the shortcut key because it kept conflicting with other shortcuts. I guess I can put it back in now.

lkcampbell commented 9 years ago

Oh...actually, now that I took the time to review key mapping...yeah, all you have to do is add the key map override and connect it to command lkcampbell.toggleIndentGuides. I will update the documentation in this extension with the id of the command an example of how to create the key map, thanks. Leaving this issue open as a reminder until I finish it.

bobrocke commented 9 years ago

Works like a charm. Thanks!

lkcampbell commented 9 years ago

Updated custom key binding documentation.