Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
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