Antihero 4 years ago • updated by Andre Renaud 3 days ago 23
It would be great to have an API to control the sidebar. Perhaps it could be populated as a list, with a standardised dict that can map onto actions, this would enable the making of trees, in this format.
( 'Parent Node',
    [ { 'onClick': doBlah, 'title': 'Blah'},
        ( 'Folder',
            [ { 'action': doAShortCut,
                    'title': 'A nested item'},
                { 'args': ['args', 'to', 'doAShortcut'],
                    'function': aCallback,
                    'title': 'Another nested'}])])

Though that's debatable.
Better go simply get access to the tree of side bar. It easier to manipulate with existing object, rather than create new one.
Each must to have a some keys like: on_*, title, tooltip, context_menu, mode(normal(this node used as usual file/folder_, manual(using tooltip, context_menu, on_* etc)), children, context, icon(or stack of icons).
Context - path, if it's a normal node, special info(plugin-specific) otherwise.
Context_menu - context menu for this node(pairs of name-callback).
On_* - callbacks.
Tooltip - help string or something like this.
Icon - icon of file and additional icons like git status.
I normally have a bunch of space under the "Open Files" and "Folders" items in the sidebar, as I tend not to have too many files open at once. I would love to write a plugin to put some navigation helpers in there. For example, for Python source files, a section that lists the classes and functions defined in the file that currently has focus. (I can think of other uses for it as well, hence the desire for it to be accessible via an API)

This is exactly the reason i'd like this feature too. To be able to build an in file explorer or in project explorer for different languages to find classes, methods, properties & other symbols.

Great feature also I want to see some options to modify the appearance of sidebar. For example change background color for modified files and add some text next to file name.

I'd like to see an API to figure out if the sidebar is hidden, or even just hook into an event when the toggle_sidebar command is run. It would really help for this plugin:


This would be great for wbond's Sublime SFTP package.
It would be nice to be able to show/hide sidebar too, toggle is not that nice to have as the only option.

If the current project behaviour was abstracted out with all the hooks for "get file list", "add file", "delete file" etc this could be packaged up as the "folders project" plugin, which would be the default project handler for .sublime-package files.

This then allows for people to write plugins to handle, for example, .csproj files. The plugin would parse the XML to get the tree view for the project, handle adding and removing files. The same could be done for Eclipse or any of the more complex environments. There's also a request on here to be able to use FTP for the projects which would be easy to impliment this way.

Sublime is never going to replace the features of a massive IDE like Visual Studio (and the community is doing a great job filling in some of the gaps), but a lot of the time I don't need those features either and I'd love to be able to just stay in Sublime. Especially when doing a lot of boilerplate or front-end work it'd be great to be able to rearrange or add new files without having to switch back and forth.


I'd go one step further and say that, if the sidebar could be written as a plugin, that is, if jps wrote it using the same API that we as final users could use, ST2 would probably be a great extensible editor and Emacs would finally be able to pass the torch.


This is the only thing stopping me from using ST as my main editor (together with Sublime SFTP support for this API ofc)

Getting a sidebar solution for Sublime SFTP is the only thing stopping me from using Sublime as my primary text editor

With this API, it would be easy to get the key functionality of Scrivener or Ulysses, which are apps for writing large structured documents such as books, or multi-page, hierarchical web documentation for an app.

One would have one Markdown file for each section of the book, organized into the folder/directory hierarchy in the file system.

What makes ST currently unsuitable is that it has no way to order files within a folder (other than alphabetically). With a sidebar API, it would be easy to add the order information to the project definition file (or to a separate file specifically for this purpose).

I'd probably implement and share this functionality if the Sidebar API becomes available.

I just started using Sublime Text 2 and I LOVE it.  It's so slick.  But how does it not have an ftp sidebar by now?  We need to develop remotely!

Hi Steven, you can use the sftp plugin to sync a local copy of a remote directory to work with.

@Steven what is the poing in having one program do everything? There are ftp programs that do everything you could want to do with integrated ftp. 

Theres definitely advantages to having it integrated, like only syncing the open files or the current file your in without having to navigate to it again inside of an ftp program. However the sftp plugin works perfectly for this :)

I should've been more specific.  I want to be able to work directly on the server.  So by sidebar, I mean I want to be able to navigate through my ftp directories in sublime.  I know I can sync a local copy but I have 100+ landing pages I work on and so i feel there becomes an issue with version control, etc.  Maybe not though, that's just how I've always worked with Aptana.

Sure, though having a local copy has its benefits, e.g. in case your internet connection drops, you can continue to work and sync once you're back online.

Its even better if you use version control. I use this flow on a project with about 3000+ php files under git version control. I can sync just the changed files with the server since my last commit, works really smooth for me at least.

There are FTP programs which mount a local hard drive with a representation of the server. You can edit those files and they will me changed in the server as soon as they are saved. You then unmount the drive and the files are gonne from your computer.

Central project and config management. Sublime FTP config file lives in the project, in the codeline. Checkout, open project, start working. done.

I don't want to manage a seperate sftp product. And I've tried them all - none of them are as slick as sublime ftp. Most of them are slow, and if you save a file in sublime - how is one to know when the "outside of sublime" 3rd party sftp client has finished transferring the file?

There should not even be a debate about this. ssh/sftp connectivity is pretty much defacto standard for dev's. Not everyone develops locally with vagrant based vm's, and where dev environments are managed over a WAN or even local network - SSH/SFTP is the standard.

Please prioritize this and open up the sidebar api. This will enable Mr. Bond to make the Sublime FTP Package even more KICK ASS then it already is. 
If this means it'd be easy for someone to develop a function list / document map plug-in then YES PLEASE.
I've done quite a bit of searching and it seems to me that there hasn't been any recent progress on this issue. I too would love to have this feature in Sublime. I work with a very large code base which must be accessed via SFTP. The wbond sftp plugin in great, and I use it everyday. But basic file manipulation is still far more limiting than the wonderful way that sublime works with the native file system. Having the sidebar API would make the whole thing a lot easier.