Home Download Buy Blog Forum Support

Add path to current file in status bar

Add path to current file in status bar

Postby willi297 on Wed Nov 18, 2009 8:32 pm

I LOVE using the full-screen view, but then I have no feedback as to the path of the current file. I would suggest that it be added to the status bar at the bottom. Current path would also be nice as well, but not as necessary.
Greg Williams
Atomic Embedded, USA
http://atomicembedded.com
willi297
 
Posts: 121
Joined: Wed Nov 18, 2009 8:29 pm
Location: Grand Rapids, MI, USA

Re: Add path to current file in status bar

Postby myel on Wed Nov 18, 2009 9:06 pm

hi,

that is possible via the api.

unzip and put the attached file into your ..\Application Data\Sublime Text\Packages\Default folder and restart sublime.

Code: Select all
import sublime, sublimeplugin

sublime.runCommand('CurrentPathStatus')

class CurrentPathStatusCommand(sublimeplugin.Plugin):
   def onActivated(self, view):
      view.setStatus('currentPath', view.fileName() )


(i don't know if thats the right way to do it, but it kinda works)
Attachments
CurrentPathStatus.zip
(271 Bytes) Downloaded 104 times
myel
 
Posts: 88
Joined: Sat Mar 22, 2008 11:26 pm

Re: Add path to current file in status bar

Postby willi297 on Mon Dec 14, 2009 4:12 pm

Sweet! Works great! Thanks myel!
Greg Williams
Atomic Embedded, USA
http://atomicembedded.com
willi297
 
Posts: 121
Joined: Wed Nov 18, 2009 8:29 pm
Location: Grand Rapids, MI, USA

Re: Add path to current file in status bar

Postby Binocular222 on Sat May 18, 2013 4:30 pm

Not work for me (I'm using ST3).
Any help?
Binocular222
 
Posts: 3
Joined: Sat May 18, 2013 4:10 pm

Re: Add path to current file in status bar

Postby skuroda on Sat May 18, 2013 6:35 pm

That was written for ST1. Try the following

Code: Select all
import sublime
import sublime_plugin

class CurrentPathStatusEvent(sublime_plugin.EventListener):
    def on_activated(self, view):
        view.set_status('currentPath', view.file_name())
skuroda
 
Posts: 358
Joined: Fri Oct 05, 2012 8:11 am

Re: Add path to current file in status bar

Postby Binocular222 on Sun May 19, 2013 1:17 am

It works!
Thanks
Binocular222
 
Posts: 3
Joined: Sat May 18, 2013 4:10 pm


Return to Ideas and Feature Requests

Who is online

Users browsing this forum: No registered users and 5 guests