olmokramer / atom-autohide-tree-view

Hides most of the tree view, reveal it on hover
MIT License
38 stars 7 forks source link

Respect Ctrl/Cmd-\ and Ctrl/Cmd-Shift-\ #42

Closed jcartledge closed 9 years ago

jcartledge commented 9 years ago

Hi,

It would be great if the Toggle Tree View (Ctrl/Cmd-) and Reveal Current File in Tree View (Ctrl/Cmd-Shift-) shortcuts worked with this plugin.

I think a good way to do this would be to hijack the Toggle Tree View shortcut to toggle the pinned status of the tree view, and hook the Reveal Current File in Tree View shortcut to set the pinned status of the tree view before the default action.

I have no idea if this is doable, but if you're happy with the approach and open to a PR I can take a look.

olmokramer commented 9 years ago

It already overrides the "show tree view" and "reveal active file" commands. Instead of pining, however, it just opens the tree view. Doesn't this work for you?

jcartledge commented 9 years ago

Hi Olmo,

No it doesn't - the tree expands and contracts a few pixels, but it doesn't actually open. I'll check if it's another extension conflicting.

olmokramer commented 9 years ago

Does it work when you run the commands from the command palette? If yes, can you open the key binding resolver (ctrl+.) and run the keybindings again? Does it actually run the correct commands?

jcartledge commented 9 years ago

OK - I don't know what's changed, but I reinstalled and it works fine now. Thanks for looking into it, and thanks for the great plugin.

olmokramer commented 9 years ago

That's great! Thanks for letting me know. There was a nasty bug that caused more trouble than I could imagine, this was probably also affected by that bug.