Sublime Forum

Thoughts on how to improve the sidebar and projects

#1

Hi,

ST2 is rapidly doing what no edit has managed to do for years: replace TextMate. But there is one part of it that feels a lot less complete and at times downright wrong than the rest: The sidebar (and, to a lesser extent, the projects concept).

Let’s illustrate with an example. I’m in a (Python/Buildout) project directory, which has some files I want to be editing at the root (*.cfg) and some source code in a subfolder (src/). It also has a lot of stuff I don’t want to have in the project (a huge parts/ directory for example).

To start working with this, I might do:

$ cd the-project
$ subl -n .

This means I get a sidebar with a “Folders” tree containing only one folder (“the-project”), which I then have to expand every time. That’s two superfluous levels of expand/collapse. It also brings in everything unless I do a global exclude of e.g. ‘parts’.

So, I might instead try:

$ cd the-project
$ subl -n *.cfg src/*

Now I have only the files and folders I want to work on. The sub-folders of src/ are under the Folders tree, and the top-level files are in the Files tree. But wait - all the files are open. I don’t want to work on them right now, I just need them there so I can search across them and maybe edit them later. Let’s close their tabs.

D’oh! All the files disappear from the Files tree.

There are a few things that feel “wrong” here:

  • The “Files” list is just the same as a list of open tabs. This is neither obvious nor terribly necessary. (If there are too many tabs to show, most applications would turn the last tab into a drop-down list of all or the hidden tabs).

  • There is no way to have top-level files in a project. The files in the “Files” list are not really part of the project (unless they also happen to be in a folder under Folders)

  • The distinction between “Files” and “Folders”: why do I care? It’s obvious from the expand/collapse icon (or lack thereof) to the left of the file/folder name

I think with relatively small tweaks, this situation could be made more logical:

  1. Rename “Files” to “Open files”.

  2. Introduce an option to hide the “Open files” list, next to the option to show/hide the tabs bar.

  3. Rename “Folders” to “Project contents”

  4. Let this contain both top-level files and folders

  5. If the ‘subl’ command line option is passed a single file, open it in a new tab; if it’s passed a directory and/or multiple files or a directory and one or more files, open a project with no files open (no “untitled” tab either!). (This is basically how the TextMate ‘mate’ command works, and I think it’s quite sensible.)

  6. Ensure it is possible to easily search across all files in a project (whether under a top level folder or not)

There are two other improvements that would also make sense:

  1. Make it possible to use the arrow keys to navigate the sidebar folder tree

  2. Make it possible to hide folders/files on a per-project basis by right-clicking on the relevant file/folder and choosing to remove it from the project (but not from disk). This is currently only possible in a top-level folder.

Cheers,
Martin

0 Likes

Sublime Text 2: I don't get projects
#2

+1

Im with @optilude here, i liked all suggestions as they improve the usability.

0 Likes

#3

+1!

I was actually thinking about posting the same thing! The sidebar is pretty useless in most cases for me at the moment. Ctrl+P does everything I tend to need at the moment.

0 Likes

#4

Agreed with all of these suggestions.

0 Likes

#5

+1

Just one minor quibble. Martin wrote:

I agree that it’s not obvious that “Files” is just a list of the open tabs, but this does seem to come in handy when you use one of the alternative layouts (multi-columns, multi-rows). Then the “Files” list turns in a number of “Group” lists corresponding to each panel. This turns out to be very useful.

An option to hide these lists would still be a welcome improvement but I just wanted to point out that the claim that these lists are “not terribly necessary” may be a bit overstated :wink:

Cheers,
Ric

0 Likes

#6

+1 to @optilude’s suggestions.

more useful changes would probably become clear, but those suggestions are a good place to start in taking the projects/files in a better direction.

0 Likes

#7

Seems someone’s been listening, in build 2111 :wink:

Done

Done

Not done, unfortunately, which means that when you open a project with top-level files, if you close the tab, you lose the file reference.

Done for opening folders, though not multiple files.

You can search open files, of course.

I do really miss these still.

Martin

0 Likes

#8

+1

This would be a feature that would make me buy sublime!

0 Likes

#9

+1

0 Likes

#10

It would nice if it behaved like NerdTree in Vim.

0 Likes

#11

I’ve been thinking about this a lot as well.

While I do appreciate a few of the design ideas behind ST2’s approach to projects, I still believe that the project system is overall quite complex, and that the complexity isn’t adding value, from a user’s perspective. And from a development perspective, I can see that the current scheme has a lot of moving parts, which could probably be jettisoned with no real loss.

The obvious comparison point is, yes, TextMate. The TextMate project system offers 3(ish) levels of complexity:

  1. Instant “project-lite” is the simplest. Just run ‘mate .’ in some directory and work with that directory’s files in a new window. This is what people want at least 75% of the time. No project file is created. No state is saved. There is no extra menu option (no menu at all) required to support this. Note that it’s very easy to open as many of these windows as you want. ST2 is always trying to save a bunch of state and can’t be used in this simple way.

  2. Next rung up the ladder: the ability to turn that view into a project file, by doing “save project as”, under the File menu. This is where the power users get started. Once a project exists, it’s easy to get back to, because “open” a folder, “open” a file, or “open” a project file in TextMate are all mapped to the same “open” in the file menu; again, no new menu items have been created, and so there is little cognitive load for the user. Any number of projects can be open at a time. They don’t try to share state.

  3. Developer level. Now we begin (for example) setting up file & folder pattern for a project, to do filtering. Power users are now fairly happy. There are little UI commands to learn (like right-clicking the right way in the projects drawer), but they don’t clutter up the general experience, and power users are happy to learn them.

With these (roughly) 3 levels of engagement, the system of setting up and accessing projects is simple, understandable, robust, and it pleases most folks.

I would seriously consider adopting something much more like TextMate’s project approach at least as a starting point, and then seeing if there are ways to improve it, or seeing what feature requests roll in.

Having said all that: fantastic software so far and thanks for your efforts! This is turning into a great editor that could really have a huge user base.

(Aside about searching: the 2 kinds of search scope in Textmate (search in file & search in project) are probably all that’s really needed. I’m not sure that ST2’s extra scopes (“search in open files” & “search in open folders”) add value that outweighs the clutter of their presence.)

0 Likes

#12

[quote=“sandover”]I’ve been thinking about this a lot as well.

While I do appreciate a few of the design ideas behind ST2’s approach to projects, I still believe that the project system is overall quite complex, and that the complexity isn’t adding value, from a user’s perspective. And from a development perspective, I can see that the current scheme has a lot of moving parts, which could probably be jettisoned with no real loss.[/quote]

I think this is a matter of opinion. Once you learn about the features of the project management, it is hard to go back to browsing around a terminal to open a project. Once you save a new project it gets added to your recent projects list. Now you can use ctrl+alt+p/cmd+alt+p to instantly jump to any project. Yes, it takes 30 seconds each time you first set up a project, but after that it is insanely fast and allows you to be nimble jumping from project to project.

[quote=“sandover”]The obvious comparison point is, yes, TextMate. The TextMate project system offers 3(ish) levels of complexity:

  1. Instant “project-lite” is the simplest. Just run ‘mate .’ in some directory and work with that directory’s files in a new window. This is what people want at least 75% of the time. No project file is created. No state is saved. There is no extra menu option (no menu at all) required to support this. Note that it’s very easy to open as many of these windows as you want. ST2 is always trying to save a bunch of state and can’t be used in this simple way.[/quote]

I agree that it would be nice if you could always reliably open a folder in a clean session. The bug is that using the -n flag when sublime isn’t open does not create a new window. Other than that, this functionality already exists.

This exists, it just seems you would prefer this to be in the file menu instead of the project menu. I personally find it pretty natural to be in a project menu, but I could see how users who are familiar with Textmate might expect differently.

It seems like there is some definitely power-user functionality available, though I will admit I have never ended up using any of it.

[quote=“sandover”]With these (roughly) 3 levels of engagement, the system of setting up and accessing projects is simple, understandable, robust, and it pleases most folks.

I would seriously consider adopting something much more like TextMate’s project approach at least as a starting point, and then seeing if there are ways to improve it, or seeing what feature requests roll in.[/quote]

It seems around 95% of the functionality you want is there, it is just presented slightly differently than Textmate. I won’t try and argue against you that Textmate has a simpler model, but from my experience the project switcher (ctrl+alt+p) and saved state is extremely useful, and I would be disappointed if it was removed.

In Sublime, “find in project” is , unless I am missing something. The only extra clutter I am seeing from “find in open files” in a single entry in the Find menu. Is this what you are referring to?

0 Likes

#13

The only thing that consistently frustrates me with the sidebar is the lack of highlighting of the currently open file in the FOLDERS area. It would be fantastic if the open file was highlighted in some way in the directory tree, either a different text color, or a dot, or dimmed – anything at all to say “hey, this is where the file is in the file system.”

The lack of the highlight leads to a confusing UI experience: when you click on the open file’s entry in the directory tree, nothing happens (since the file is highlighted above in OPEN FILES).

Perhaps this is just a theme issue? I’m not sure, in the myriad of wonderful ways you can tweak ST2, if that’s already a hidden setting waiting to be taken advantage of.

0 Likes

#14

I’d really, really appreciate icons in the folder tree.

I can have three files all named “buccamentbay.*” in the same folder, and it’s a PITA to then have to read the extension when an icon would be so much clearer and, if done correctly, I wouldn’t have to read the filename at all because the image would denote which item to click.

0 Likes

#15

Here is another idea for sidebar: when i change projects all files are opening again BUT the sidebar folders are not opened like they was before. Is pretty annoying on big projects (with nested files).
There is a setting for that?

0 Likes

#16

The features I would really like to see are:

  1. Ability to add files from anywhere to a project, not just whole folders that you then have to exclude a bunch of files. Kinda like Textmate currently does.

  2. Highlight the file you are currently working on (already mentioned here)

  3. Ability to drag files to the project and organize into folders without ST2 opening the file. Again, like Textmate or Espresso.

Please, Please, Please. Then my conversion from Textmate can be almost complete. And keep up the good work!

0 Likes

#17

Why was the ability to have multiple windows opened with the same project removed? This was something really useful when working with multiple monitors.

The only workaround I can think of now is to copy/paste the project file you want to have in multiple windows and from that point on always mirror changes in both files. There would be some waste of resources in terms of search indexing and the like being duplicated but I have no clue on how important that is. Not the best situation though…

Could that be brought back?

0 Likes

#18

How can i remove a certain project from the switch project window (ctrl+alt+p) ?

My project list is pretty long now and i want to remove some old stuff :smile:

0 Likes

#19

It would nice if it behaved like NerdTree in Vim.

0 Likes