Tip #468: display date-and-time on status line
tip karma |
Rating 64/45, Viewed by 2387
|
created: |
|
May 1, 2003 8:42 |
|
complexity: |
|
basic |
author: |
|
Dorai Sitaram |
|
as of Vim: |
|
5.7 |
It didn't seem like an existing tip mentioned this, so:
The following lines in .vimrc or a plugin file will display
the time of day and calender date (some of us need that reminder)
on the editor status line:
set ruler
set rulerformat=%55(%{strftime('%a\ %b\ %e\ %I:%M\ %p')}\ %5l,%-6(%c%V%)\ %P%)
It doesn't update time if you issue no keystrokes, but as soon as you
do anything at all in the editor, you will get the current time.
<<vim windows displaying output inside vim window |
The use of %< instead of % >>
Additional Notes
|