Is it possible to show the relative path to a file in the title bar? Showing only the file name can be confusing when working with similarly named files in different folders and showing the full path seems to be a waste of when I only care about the end.

As far as I know this isn't possible. One issue with attempting to implement something like this (that I could think of) is relative to what? Though not in the title bar, a plugin to display some subsection of the path in the status bar is doable. Maybe that would suffice for what you need?

skuroda wrote:As far as I know this isn't possible. One issue with attempting to implement something like this (that I could think of) is relative to what? Though not in the title bar, a plugin to display some subsection of the path in the status bar is doable. Maybe that would suffice for what you need?

It ain't impossible. I've had "Subethaedit + Transmit" working this way.I'm searching for this aswell... There is a possibility to "activate" the path but what you get is something like this;"~/Library/Caches/Cleanup At Startup/Transmit/BAE7A76C-116F-644F-8487-7B381FB6FFCF/file.php"

While in the previous situation (Subethaedit + Transmit) it was something like this;"ftp://domain-name.com:21//domains/domain-name.com/public_html/path/file.php"

I hope a developer reads this, because this extra feature will be so helpful. I've had a few encounters where i accidentally edited the wrong website

Yes, part of the issue is that sublime doesn't have or expose the notion of current working directory (CWD). That notion partially conflicts with the idea of "project folders"; since you can have >1 project folder, which is the CWD? One solution would be to have the CWD for a buffer's editing session to be it's containing project folder, but that has issues when the file is in >1 project folder, or one project folder is nested in another.

Another option is to have the CWD as the directory that sublime is launched from. Some editors have the notion of CWD, and some have a console/commandline which allows it to be changed with a CD command.

In Sublime's "intuitive-land", I would favour the approach of the CWD being containing project folder, with some caveats for the multiple project folder scenario above. The CWD for a file that doesn't belong to a project folder would be the launch dir, and it would be nice to have a Sublime console command to change/show the CWD as well.

class ExampleCommand(sublime_plugin.TextCommand): def run(self, edit): # check if the current path is in one of the project folders. # If yes, then return the relative path of the current file. for path in sublime.active_window().folders(): project_path = os.path.normpath(path) file_path = os.path.normpath(sublime.active_window().active_view().file_name())

This just prints out the relative path of the active view, so it would need some work to display it somewhere (not sure where ). It also isn't correctly using self.view but I couldn't be bothered to change it (this was more of a proof of concept).