453

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?

Igor Kustov
3,3062 gold badges36 silver badges31 bronze badges
asked Aug 16, 2012 at 21:18
2
  • Is there a way to open all of your sublime text two files on the right hand scroll bar? Commented Nov 29, 2012 at 16:29
  • Recommand you to use that package github.com/facelessuser/FuzzyFileNav Commented Nov 10, 2014 at 23:07

10 Answers 10

749

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.

answered Aug 16, 2012 at 21:42
Sign up to request clarification or add additional context in comments.

13 Comments

On OS X just normally use File -> Open and then click Open in any folder in the new file dialog.
Ive been trying to find a plugin for that for like 6 months lol +1
Is there a keyboard shortcut to navigate the folder panel without using the mouse?
just figured out Ctrl + 0
can't you just somehow see list of files in current folder, where the currently opened file sits? I can't believe no one yet written such a plugin. Yes you can see them in "Open File" dialog, but wouldn't it be great to be able to see current folder structure, and navigate out and into inner folders right in the side bar, and maybe preview files without really opening them like in Visual Studio 2012
|
108

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.

answered Sep 30, 2012 at 13:40

2 Comments

ctrl+k ctrl+b or cmd+k cmd+b (MAC) to enable side bar
My sidebar was just gone for no apparent reason! This fixed it. Thanks! :)
55

Use Ctrl+0 to change focus to the sidebar.

vahid abdi
10.4k4 gold badges31 silver badges37 bronze badges
answered Oct 30, 2013 at 19:08

6 Comments

THANK YOU. Once sidebar is focused, up/down go prev/next file, left/right collapse/expand!
It's not the answer to the asked question, but it helped me.
@mmohaveri That's debatable. It was a poorly-worded question to begin with.
In Windows '''Ctrl-K Ctrl-B" opens and closes the sidebar. Of course you first need to View->ShowOpenFiles, or have a project set in order to have access to the sidebar.
THANK YOU, that's the answer I was looking for :) Ctrl-0 (zero) and the file is highlighted in the sidebar.
|
27

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.

answered Jan 7, 2014 at 13:04

2 Comments

Agreed, File > Open... opens the folder in a new project.
This is what I was looking for without knowing it -- new to Sublime and didn't grok projects...
18
  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.

answered May 12, 2014 at 4:14

Comments

12

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

adelarsq
3,7484 gold badges40 silver badges47 bronze badges
answered May 12, 2013 at 19:46

Comments

5

Just drop your folder on sublime, and them show/hide with:

  • MacOS: +K+B

  • Windows: Ctrl+K+B

Have a nice day! :D

answered Jan 14, 2020 at 21:01

4 Comments

this shortcut is supported in any particular version or all ?
@AkberIqbal This work in SublimeText2 since 2012(I don't know which version), but this shortcut only work in some cases, if it don't worked to you this one should do the trick: Ctrl+k AND THEN Ctrl+b. You can see it working in 2012 Sublime2 here: forum.sublimetext.com/t/ctrl-b-ctrl-k-doesnt-toggle-sidebar/…
I'm not sure if it works for all versions, but justo go to the latest and you should be Fine. Also, Ctrl+k and then Ctrl+b works as well
You didn't explain what the shortcut does. Also, is there a Mac equivalent that uses Cmd instead of Ctrl?
3

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

answered Nov 7, 2013 at 16:51

Comments

2

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.

answered Jun 1, 2014 at 5:19

1 Comment

and if you prefix the name with : you can create the file in a location relative to the currently open file, eg: :../myfile.js
0

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\""
answered Jan 31, 2014 at 10:05

1 Comment

Generally, creating a service would be done with Automator. Can you elaborate a little more on how to do what you are describing? As it is, the answer feels incomplete.

Your Answer

Draft saved
Draft discarded

Sign up or log in

Sign up using Google
Sign up using Email and Password

Post as a guest

Required, but never shown

Post as a guest

Required, but never shown

By clicking "Post Your Answer", you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.