Skip to content

Instantly share code, notes, and snippets.

@jugyo
Created February 26, 2013 07:41
Show Gist options
  • Star 6 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save jugyo/5036719 to your computer and use it in GitHub Desktop.
Save jugyo/5036719 to your computer and use it in GitHub Desktop.
Sublime Text Plugin to show file name on status bar
import sublime_plugin
class FileNameOnStatusBar(sublime_plugin.EventListener):
def on_activated(self, view):
path = view.file_name()
if path:
for folder in view.window().folders():
path = path.replace(folder + '/', '', 1)
view.set_status('file_name', path)
else:
view.set_status('file_name', 'untitled')
@nivir
Copy link

nivir commented Oct 8, 2020

Thank you for sharing:)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment