Sublime Text 2 - Show file navigation in sidebar

Sublimetext2Sublimetext

Sublimetext2 Problem Overview


I just switched to Sublime Text as my new editor. If I open the sidebar it shows the opening file, but what I want is a file navigation sidebar, is it possible to change that without downloading plugins?

Sublimetext2 Solutions


Solution 1 - Sublimetext2

You have to add a folder to the Sublime Text window in order to navigate via the sidebar. Go to File -> Open Folder... and select the highest directory you want to be able to navigate.

Also, 'View -> Sidebar -> Show Sidebar' if it still doesn't show. In the new version, there is only an 'open' menu and no separate option for opening a folder.

Solution 2 - Sublimetext2

You may drag'n'drop your folder to Side bar. To enable Side bar you should do View -> Side bar -> show opened files. You'll got opened files (tabs) tree and folder structure at Side bar.

Solution 3 - Sublimetext2

Use Ctrl+0 to change focus to the sidebar.

Solution 4 - Sublimetext2

Instead of opening a folder, try adding a folder by going to "Project" -> "Add Folder to Project..." which opens a Folder choosing dialog. This way the folder won't open in a new window and will be added to your current workspace.

If you then go to "Project" -> "Save Project As..." you can even save your current setup (cells setup, opened files, unsaved changes, etc...), this makes it easy to hotswitch between multiple projects without loosing control and unsaved changes which could be unsafe to be saved right now, but would be a loss if you just ditched them. (Just be sure to have the "hot_exit" setting set to true.)

And Ctrl + Alt + P (Linux and Windows) / Super + Ctrl + P (Mac) lets you switch between the saved projects.

This way you don't have to setup your editor every time you want to work on one of your projects.

Hint: Try http://sublime-text-unofficial-documentation.readthedocs.org/en/sublime-text-2/ which is a wonderful resource for beginners, it teaches you the ropes and shows you the power of your "new" editor, just start with the "Editing" chapter.

Solution 5 - Sublimetext2

  1. open ST ( Sublime Text )

  2. add your project root folder into ST : link : https://stackoverflow.com/a/18798528/1241980

  3. show sidebar : Menu bar View > Side Bar > Show Side Bar

  4. Try Ctrl + P to open a file someFileName.py

Does a navigation panel for openned files and project folders appear in the left of ST ?

Extra : Want view the other files that are in the same directory with someFileName.py ?
While I found ST side bar seems doesn't support this, but you can try Ctrl + O (Open) keyshort in ST to open your system file browser, in which the ST will help you to locate into the folder that contains someFileName.py and it's sibling files.

Solution 6 - Sublimetext2

Both of the previous answers from Matt York and Cyberbolt are right.

Basic idea is here that you want to get some kind of File explorer in Sublime.

Approach:

  1. With File -> New Folder -> Click on Desired folder and Hit Open you will get new popup window in sublime which for me is very annoying

  2. I use second option which is drag'n'drop from nautilus (a.k.a. Files) window. Simply drag'n'drop your file you want to explore from nautilus to sublime sidebar. That way you stay in the same window and everything is cool.

Don't forget to enable View -> Sidebar -> Show Sidebar and drag'n'drop there from nautilus and of course run it with root privleges. It works like charm

Solution 7 - Sublimetext2

See this plugin

https://github.com/stvkoch/sublime-text-go-to-file

> This version, while not merge with fork branch, has more power to find > files basead on class name. > > Try: > > select namespace and click alt+d click on word of class name and click > alt+d click on path of template file and click alt+d

Solution 8 - Sublimetext2

Just do: Ctrl+K+B

Have a nice day! :D

Solution 9 - Sublimetext2

This is not exactly a solution, but for opening new files this works great:

AdvancedNewFile

https://github.com/skuroda/Sublime-AdvancedNewFile

Command + Option + n to save a file in a new or existing directory.

enter image description here

So this would place your_file.html.erb in the existing views directory in a Rails app. If you needed a new directory -you would just type that as the path and then hit enter.

You can also Tab like in terminal to autocomplete for existing directories.

This does not give the sidebar navigation I am looking for, but at least helps with one significant need that is repeated often.

Solution 10 - Sublimetext2

I added the Context Menu item for Folders to open in Sublime Text. In windows, you can right click on any Folder and open the structure in Sublime. You could also create a service (?) for Mac OS - I'm just not familiar with the process.

The following could be saved to a File (OpenFolderWithSublime.reg) to merge to the registry. Be Sure to modify the directory structure to appropriately point to your Sublime installation. Alternatively, you can use REGEDIT and browse to HKCR\Folder\shell and create the values manually.

Windows Registry Editor Version 5.00

[HKEY_CLASSES_ROOT\Folder\shell\Open with Sublime Text]

[HKEY_CLASSES_ROOT\Folder\shell\Open with Sublime Text\command]
@="C:\\Program Files\\Sublime Text 2\\sublime_text \"%1\""

Attributions

All content for this solution is sourced from the original question on Stackoverflow.

The content on this page is licensed under the Attribution-ShareAlike 4.0 International (CC BY-SA 4.0) license.

Content TypeOriginal AuthorOriginal Content on Stackoverflow
QuestionsozhenView Question on Stackoverflow
Solution 1 - Sublimetext2Matt YorkView Answer on Stackoverflow
Solution 2 - Sublimetext2bulatzamilovView Answer on Stackoverflow
Solution 3 - Sublimetext2ScottView Answer on Stackoverflow
Solution 4 - Sublimetext2sternAndyView Answer on Stackoverflow
Solution 5 - Sublimetext2LyfingView Answer on Stackoverflow
Solution 6 - Sublimetext2MatijaView Answer on Stackoverflow
Solution 7 - Sublimetext2Steven KochView Answer on Stackoverflow
Solution 8 - Sublimetext2Breno Medeiros de OliveiraView Answer on Stackoverflow
Solution 9 - Sublimetext2JordanView Answer on Stackoverflow
Solution 10 - Sublimetext2BrentView Answer on Stackoverflow