Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I want to know how to display the server time inside the Vim editor, if possible.

share|improve this question
What is “sever time”? – Gilles May 13 '11 at 21:46
up vote 1 down vote accepted

You can execute external commands in Vim by using the '!' flag:

:! date


share|improve this answer
As an added bonus, adding a r after the : will write the output into your buffer. Like so, :r! date. – jonyamo Oct 4 '11 at 18:30

If you like, you can set Vim up so it displays the time on the status bar by adding the following lines to your vimrc file:

set ruler
set rulerformat=%55(%{strftime('%a\ %b\ %e\ %I:%M\ %p')}\ %5l,%-6(%c%V%)\ %P%)

Credit goes to this Vim Wiki page.

share|improve this answer
thanks a lot, but i like simple as kce's answer ^^ – meotimdihia May 15 '11 at 4:05

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.