Sublime Forum

Temporarily display project hidden files and folders

#1

Hello,

I am just now trying to use projects more. One of the features I like a lot is folder and file hiding. I like to be able to focus on just the files I need when I work. I even hide the *.sublime-project" and *.sublime-workspace files.

That being said, then, I have a problem when I want to edit the project file (i.e. the .sublime-project file). If I open the project file, it opens the project instead of the file and I can’t see it in the project.

Is there a way to toggle the file and folder hiding for a project other than by editing the settings file? Is there a way to tell Sublime Text to ignore those settings temporarily? Is there a plugin for that or a native command or something?

Right now, I am thinking I will not hide the .sublime-project file, but I would like to be able to.

Thanks
Ghyslain

0 Likes

#2

As far as I’m aware the only way you could toggle the state of a file being hidden or not would be to modify the settings to include or not include it, so presumably any package that does this would just be doing that for you.

That said, the menu command Project > Edit Project will open the project file associated with the current window for you to edit; it’s grayed out if the window doesn’t have a project assigned to it. Any changes you make to the project are reflected as soon as you save the file.

1 Like

#3

Thank you so much.

The Project > Edit Project command in the menu does exactly what I need. I hadn’t noticed that (my bad, I feel like an idiot now).

For any other file (e.g. .gitignore), I just go to the command line and type subl .gitignore and edit the file. This works even if the file is the file_exclude_patterns setting of the project, and that is enough for me. I don’t see it for the 99.9% of the time when I don’t want to think about it and I can “force” edit it when I need. The only problematic file for me was the .sublime-project.

I get all of what I wanted, so again, thanks a lot.

Ghyslain

0 Likes

#4

This whole Project vs Folder thing is confusing the ass of me.

Just tell me, please - what way does ST envision us using projects and folders ?
If I knew that I could maybe create separate projects and add whatever files and folders to each of them.
Maybe at that point I could start to configure the files I wanted to open for each project and keep all the others closed or at least hidden.

0 Likes

#5

You open a folder or folders if you want to work with the files contained inside of them as a whole, such as if you have a programming project, a website, etc; something where you may want to skip around anywhere inside of the structure to open files, look at files, etc.

You create a sublime-workspace when you want to specifically remember the folders you have open, the window layout that you’re using, keep unsaved files and tabs, the history of your choices in quick panels, etc, and have them easily reopened via the items in the menu or the Quick Switch dialog box.

You create a sublime-project (which also implicitly creates a sublime-workspace) if you want to be able to control what files and folders appear from the ones you’ve opened (project specific file filters), apply global settings only within a specific window (project specific settings) or have build systems that are specific to a particular project (project specific build systems).

A window can only have one project/workspace open within it at a time. So, when you find yourself needing specific configuration in some cases, or you frequently need to work with the same sets of files, you want to use projects. You can easily call up the state of things as you left them without having to keep re-opening folders, etc.

0 Likes

#6

Since I see no option to Create New Workspace nor Create New Project, I assume we “create” a new workspace using the Save As … menu item for the default workspace.

And then do likewise for the default project within that.
Then we add one or more folders to that project and open (via double-clicking on the filename inside the sidebar file explorer) the files we want automatically opened each time we switch to that workspace/project. Once opened, this project is never closed while the files are needed open.

Repeat for the next projects.
To switch from one project to another use Project > Quick Switch Project …
Missing anything ?

0 Likes

#7

Every window inherently has a workspace and a project associated with it, as soon as it’s created. The workspace stores the layout and the project stores the project specific settings.

Should you want to persist that window’s project/workspace specifically, you indeed do the appropriate Save As option from the menu.

if you don’t do that, then the state of that window is persisted into the overall application session information instead; so quitting Sublime and restarting it brings it back. Closing the window loses the information (the session only stores the state of the application as it existed at exit). Hence, you would manually save a project/workspace if you deem what you’re working on in a window interesting enough to keep for later.

0 Likes