You know, what would be cool? If each file tab would somewhere show me the modification time of this file.
The status bar is a more appropriate place to show that imo. Tabs are crowded.
Both of them can be done with plugin APIs already anyway.
Do you know if there is already a plug-in, which does this?
Well yeah, the status bar is definitely a good place. I didn’t actually mean on the tab when I said that. I just meant that the modification time should be shown somewhere when I click on a file tab.
No. I don’t claim it exists or it doesn’t. I just say it can be done via plugin APIs.
Here’s a simple implementation.
import datetime import os import sublime import sublime_plugin class ShowFileModifiedTimeListener(sublime_plugin.ViewEventListener): def on_activated_async(self): file = self.view.file_name() try: mtime = os.path.getmtime(file) except: mtime = 0 self.show_file_modified_time(self.view, mtime) def show_file_modified_time(self, view, t): if t == 0: sublime.status_message("") return mdate = datetime.datetime.fromtimestamp(t) view.set_status("mdate", mdate.strftime("mod: %Y/%m/%d %H:%M:%S"))
Man, you are truly awesome I will try this when I have the chance.
Edit: I tried this and it just works magically. Thanks!