(Insert TipProposed template + minor manual clean) |
JohnBeckett (talk | contribs) m (Reverted edits by 101.160.152.109 (talk | block) to last version by JohnBot) |
||
(2 intermediate revisions by one other user not shown) |
Latest revision as of 02:02, 5 May 2014
Put in your vimrc:
set statusline=%<%f%<%{FileTime()}%<%h%m%r%=%-20.(line=%03l,col=%02c%V,totlin=%L%)\%h%m%r%=%-30(,BfNm=%n%Y%)\%P\*%=%{CurTime()} set rulerformat=%15(%c%V\ %p%%%) "set rulerformat=%<%f%<%{FileTime()}%<%h%m%r%=%-20.(line=%03l,col=%02c%V,totlin=%L%)\%h%m%r%=%-30(,BfNm=%n%Y%)\%P\*%=%{CurTime()} function! FileTime() let ext=tolower(expand("%:e")) let fname=tolower(expand('%<')) let filename=fname . '.' . ext let msg="" let msg=msg." ".strftime("(Modified %b,%d %y %H:%M:%S)",getftime(filename)) return msg endfunction function! CurTime() let ftime="" let ftime=ftime." ".strftime("%b,%d %y %H:%M:%S") return ftime endfunction
Comments[]
This gets the file's mtime on each update. Isn't that somewhat of an overkill?