What would be the easiest way to display the last modified time of a file (the time at which the file was saved last) in the title or in the statusline?
I have a few ideas, but they all require parsing the dir (oh, I forgot to mention, ... I'm using Windows XP and cmd) command output. Any better solutions? Or just ideas on what would be the shortest way to accomplish this?
The following commands could be entered to display the information shown. If all that is wanted is to display the name of the current file, type Ctrl-G (or press 1 then Ctrl-G for the full path).
By default, Vim only shows the filename of the currently open file in the status line and the command line below it. Sometimes, you might want to view the full path of the file. To do that, press 1 followed by Ctrl-G . The full path of the file is displayed in the command line at the bottom.
:set title titlestring=%{strftime('%c',getftime(expand('%')))}
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With