Show date and time in Vims statusbar
Often I've my 'fullscreened' my Vim windows and I can't see the current time instantly on my panel. The next snippet puts the current date and time in Vims statusbar. Put it in your ~/.vimrc
.
set ruler
set rulerformat=%55(%{strftime('%F\ %H:%M\ %p')}\ %5l,%-6(%c%V%)\ %P%)
{strftime('%F\ %H:%M\ %p')}
defines the current date and time. <br />
%5l,%-6(%c%V%)\
defines the line and column of the cursor.<br />
%P%
defines the relative position of my cursor to the file, E.g, 65% or Bot.
It looks like this:
Written by Auke Willem Oosterhoff
Related protips
Have a fresh tip? Share with Coderwall community!
Post
Post a tip
Best
#Vim
Authors
Sponsored by #native_company# — Learn More
#native_title#
#native_desc#