DisposaBoy / GoSublime

A Golang plugin collection for SublimeText 3, providing code completion and other IDE-like features.
MIT License
3.42k stars 302 forks source link

Open Go packages by adding their folder to sidebar? #553

Open dmitshur opened 10 years ago

dmitshur commented 10 years ago

GoSublime has a very useful feature "Browse Packages", activated via Cmd+.,Cmd+O. I use it all the time.

image

However, once you find a package you want to "open", it presents a list of files.

image

Usually I want to work with that package in general, so having to pick a single file (which file do I open?), or repeat the step to open all files (which could be as many as 5-10+) is pretty inconvenient.

I know Sublime Text 3 has API to open folder/add folder to project, which adds it to sidebar. I think it would be super useful if GoSublime would let me open Go package folders that way.

image

What are your thoughts on this idea/proposal?

dmitshur commented 9 years ago

Note that this doesn't have to replace the current ability to open individual files. The smallest change would be to add a new item entry called "Add Folder to Project" or similar. So you can still do everything you can do now, or add the folder to sidebar for convenience.

dmitshur commented 9 years ago

As a temporary workaround until this is supported in GoSublime directly, I made https://gist.github.com/shurcooL/c99a5a32551906f8a147 that adds the folder containing current file to sidebar when I press F3.

dmitshur commented 9 years ago

This has got to be one of my most commonly used shortcuts after Cmd+.,Cmd+O to open packages and make all their files easily accessible.