Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

"Last modified" time in the title or statusline

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?

like image 816
Rook Avatar asked Dec 08 '11 05:12

Rook


People also ask

How to check filename in vi?

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).

How to check file path in vim?

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.


1 Answers

:set title titlestring=%{strftime('%c',getftime(expand('%')))}
like image 65
kev Avatar answered Oct 06 '22 01:10

kev