3

In vim 7.3, I'd like to show the current time and git info on the ruler bar.

How can I do this?

From vim's guide, it seems I should modify the rulerformat option, but how?

m0tive
  • 2,796
  • 1
  • 22
  • 36
hero2008
  • 611
  • 6
  • 16

1 Answers1

7
  1. for git info, better way to do it is using fugitive.vim, after you installed the fugitive vim plugin, you can set your statusline in your .vimrc

    set statusline =... %{fugitive#statusline()} ...

  2. to display time in your statusline, you need strftime function, eg.

    set statusline+=%{strftime("%I:%M")}

You can look here for more statusline ideas

Community
  • 1
  • 1
number5
  • 15,913
  • 3
  • 54
  • 51