-
-
Save nivir/4656a501aeaad8c952a339275f55a08b to your computer and use it in GitHub Desktop.
Sublime Text Plugin to show file name on status bar
This file contains 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