Created
February 26, 2013 07:41
-
-
Save jugyo/5036719 to your computer and use it in GitHub Desktop.
Sublime Text Plugin to show file name on status bar
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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') |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Thank you for sharing:)