ctrl+shift+p filters: :st2 :st3 :win :osx :linux
Browse

Focus File on Sidebar

by miguelgraz ST3

Sublime Text plugin to open sidebar and focus on the current opened file

Labels focus, sidebar

Details

  • 2015.07.20.00.11.40
  • github.​com
  • github.​com
  • 2 years ago
  • 52 minutes ago
  • 3 years ago

Installs

  • Total 17K
  • Win 9K
  • OS X 6K
  • Linux 3K
Jan 19 Jan 18 Jan 17 Jan 16 Jan 15 Jan 14 Jan 13 Jan 12 Jan 11 Jan 10 Jan 9 Jan 8 Jan 7 Jan 6 Jan 5 Jan 4 Jan 3 Jan 2 Jan 1 Dec 31 Dec 30 Dec 29 Dec 28 Dec 27 Dec 26 Dec 25 Dec 24 Dec 23 Dec 22 Dec 21 Dec 20 Dec 19 Dec 18 Dec 17 Dec 16 Dec 15 Dec 14 Dec 13 Dec 12 Dec 11 Dec 10 Dec 9 Dec 8 Dec 7 Dec 6 Dec 5
Windows 3 9 6 2 0 4 8 6 4 13 14 8 2 8 9 4 4 5 4 1 4 6 2 3 5 4 3 5 8 5 6 8 4 2 6 5 5 7 5 3 5 9 12 7 10 7
OS X 9 9 4 5 9 0 4 5 4 4 3 2 1 5 9 8 4 7 2 4 1 9 7 4 0 3 1 6 1 5 8 4 4 1 5 5 7 4 5 2 6 3 3 7 8 6
Linux 4 2 3 2 1 1 3 1 1 4 2 0 0 1 4 2 4 2 0 3 1 3 2 0 0 1 0 5 3 2 2 1 4 0 1 3 4 4 6 1 3 2 2 1 3 3

Readme

Source
raw.​githubusercontent.​com

FocusFileOnSidebar

Sublime Text has two options regarding its sidebar: Toggle Side Bar and Reveal in Side Bar, in many (mine :P) workflows people want to browse their files tree right on the opened file's folder, which isn't possible with those two options alone.

This plugin aims to give an easier and simple option that allows the developer to use the new command Focus File On Sidebar to open sidebar and move focus right to the opened file's place on project's tree, this way the user can navigate on files tree with keyboard arrows, and use the same command Focus File On Sidebar to close sidebar and fold the unfolded folders, preparing it to be used in the same way again (this is needed because if the folder is already opened the focus goes to “opened files” section on the top of sidebar).

It's hard to explain how this small changing of focus to the sidebar improved my everyday workflow, I no longer use the Reveal in Side Bar command, I'd suggest you to give it a try.

Using

By default the plugin adds the Focus File On Sidebar command to the command pallete (control+shift+P) and adds the shortcut Ctrl+K, Ctrl+F (Windows/Linux) or Cmd+K, Cmd+F (OSX) to be used faster, obviously you can overwrite this options on your Packages/User/Default (YourOS).sublime-keymap file simply by assigning another shortcut to focus_file_on_sidebar command.

Configuring

If your sidebar is already opened by default the plugin closes it and focus back on your file, some people weren't expecting this behavior, instead they wanted the plugin to focus the current file on sidebar (since you can change the current file while having the sidebar opened). Thinking about this different workflow I've added an option named close_sidebar_if_opened defaulting to true, if you prefer to always have your sidebar opened and that the plugin just reveal and focus different files please add a line with "close_sidebar_if_opened": false to your Packages/User/Preferences.sublime-settings file, like this.

Installing

In the same way you can install all the others Sublime plugins, by running a git clone git@github.com:miguelgraz/FocusFileOnSidebar.git on your Packages folder or, if you use Package Control, just by searching the plugin's name and installing from there.

Errors? Doubts? How this differs from Reveal in Side Bar? Contributing?

You can always send a pull request, send me an email or create an issue with your doubts/feature request/critics =)

I really hope this could be of any use for you!