TheSpyder / SyncedSideBar

Sublime Text plugin to sync project sidebar (folder view) with currently active file.
341 stars 23 forks source link

Feature request: Please add keybinding for manual use #24

Closed ktaragorn closed 10 years ago

ktaragorn commented 10 years ago

I use it in manual since I dont need it that often, and it is quite distracting.. However it is quite hard to use in manual mode, lot of keys to be typed. I suggest a keybinding, perhaps ctrl + shift + R to reveal the file.

twolfson commented 10 years ago

I have this flavor of setup. It is silly for the repo to bend over backwards for adding a keybinding though.

To set this up for your machine, you can disable syncing (available via command palette as "Side Bar: Disable Syncing") and then add your key binding (the command is reveal_in_side_bar)

https://github.com/sobstel/SyncedSideBar/blob/10118acfe01d2fd51fbfe1b95cba74a21389b750/Commands.sublime-commands#L3-L6

[
  { "keys": ["ctrl+shift+r"], "command": "reveal_in_side_bar" },
]
ktaragorn commented 10 years ago

Bend over backwards seem a bit extreme a phrase for a couple lines of code.. I figured that this is a missing feature (rather than a extra feature) and that others would find this useful as well..

Got the keybind working, but I still feel its better if the plugin offers it out of the box.

TheSpyder commented 10 years ago

If reveal_in_side_bar was a plugin command, I'd absolutely agree with you. But it's a sublime command. It has nothing to do with this plugin other than being the command it uses to show the sidebar.

I don't want to get into supporting a keyboard shortcut, making it relevant and non-conflicting for all platforms, etc etc. Far better for you to add one to your own config as necessary :)

ktaragorn commented 10 years ago

Hmm, I didnt realize it is independant of this plugin.. Doesnt that mean, though, that the Sublime command is also an equal hack?

TheSpyder commented 10 years ago

The command is a supported feature of sublime - it's the same command that the "reveal in side bar" menu item uses (right click on code in ST3, I believe it's in the view menu of ST2). The command is what makes this plugin possible - there are zero sidebar APIs in sublime :)

ktaragorn commented 10 years ago

Hmm, Couldnt find it in ST2.. odd.. anyway tnx, maybe i can make a plugin for the keybind alone

On 6 February 2014 12:42, Andrew Herron notifications@github.com wrote:

The sublime command is the same one that the "reveal in side bar" menu item uses (right click on code in ST3, I believe in the view menu of ST2). The command is what makes this plugin possible - there are zero sidebar APIs in sublime :)

Reply to this email directly or view it on GitHubhttps://github.com/sobstel/SyncedSideBar/issues/24#issuecomment-34291982 .

TheSpyder commented 10 years ago

Looks like it's on the right click menu for ST2 as well. Maybe it's moved since this plugin was created - way back during the ST2 beta :)

I still don't really understand why it needs to be in a plugin, but if you can come up with a reasonable default for all 3 platforms that Sublime supports I'll happily accept a pull request.

ktaragorn commented 10 years ago

Ah, its there in Right click on code in ST2 as well.. wonder why i didnt look there.. , thanks again

On 6 February 2014 12:46, Karthik T karthikt.holmes@gmail.com wrote:

Hmm, Couldnt find it in ST2.. odd.. anyway tnx, maybe i can make a plugin for the keybind alone

On 6 February 2014 12:42, Andrew Herron notifications@github.com wrote:

The sublime command is the same one that the "reveal in side bar" menu item uses (right click on code in ST3, I believe in the view menu of ST2). The command is what makes this plugin possible - there are zero sidebar APIs in sublime :)

Reply to this email directly or view it on GitHubhttps://github.com/sobstel/SyncedSideBar/issues/24#issuecomment-34291982 .

ktaragorn commented 10 years ago

Am using [ { "keys": ["ctrl+shift+r"], "command": "reveal_in_side_bar" }, { "keys": ["super+shift+r"], "command": "reveal_in_side_bar" } ]

This works for me on mac since I have my control key mapped to command, will work otherwise as well. Not sure if this is blocking anything else though (cant find any other commands using these binding).

On 6 February 2014 12:49, Andrew Herron notifications@github.com wrote:

Looks like it's on the right click menu for ST2 as well. Maybe it's moved since this plugin was created - way back during the ST2 beta :)

I still don't really understand why it needs to be in a plugin, but if you can come up with a reasonable default for all 3 platforms that Sublime supports I'll happily accept a pull request.

Reply to this email directly or view it on GitHubhttps://github.com/sobstel/SyncedSideBar/issues/24#issuecomment-34292231 .

TheSpyder commented 10 years ago

What I meant by each platform was sublime has 3 separate default key binding files, one for each platform - and plugins can do the same.

If ctrl+shift+r doesn't conflict on linux or windows then that seems reasonable.

ktaragorn commented 10 years ago

Checked all 3 for ST2, no conflict.

On 6 February 2014 14:13, Andrew Herron notifications@github.com wrote:

What I meant by each platform was sublime has 3 separate default key binding files, one for each platform - and plugins can do the same.

If ctrl+shift+r doesn't conflict on linux or windows then that seems reasonable.

Reply to this email directly or view it on GitHubhttps://github.com/sobstel/SyncedSideBar/issues/24#issuecomment-34295585 .