oleg-shilo / Favorites.vscode

VSCode extension for managing Favorites
MIT License
23 stars 6 forks source link

Option-Click Support #4

Closed cbray closed 3 years ago

cbray commented 6 years ago

Awesome extension! Works better than the other "Favorites" extensions, thank you!

When you have the time, would you be able to add support for the VSCode "option-click" behavior? I believe it's "alt-click" on Windows? (I'm on a mac). In the VSCode file tree this will open the clicked file in a new editor panel, I use it often.

Also drag-and-drop re-ordering of files would be amazing. Thank you again!

oleg-shilo commented 6 years ago

Noted. Thank you.

Haven't had a look at it but most likely "alt-click" is just a matter of the configuration. "drag-and-drop re-ordering" would be fantastic, though not sure the hosting API exposes. But definitely a thing to look at. "Open Editors" has it implemented.

oleg-shilo commented 6 years ago

Had a look at "alt-click" and immediately remembered. I wanted to use alt to distinguish between selecting and "opening" tree item. The existing API just does not support it. You can have keyboard modifiers for the commands bound via config files. But TreeView does not work via config but instead internally executes a command associated with the TreeItem. there is no way to customize this association (just a constructor argument).

Alternative approach would be to test the alt/option key state just before executing the command. This would be a piece of cake with any desktop UI framework. But... VS Code is a browser. Node.js API just does not have anything for the keyboard state.

This is rather unfortunate.

And ordering items by drugging them...the same. The API does not support it for custom views. There is a feature request for it though: https://github.com/Microsoft/vscode/issues/32592