How to Show Time and Battery Status on Vim 8 Statusline

Hi  People!

As a Vim lover and user, I decided to clean my vimrc a bit this week creating my own statusline and dropping the excellent vim-airline. As I frequently commute by train and I normally use Vim in fullscreen mode, I decided to tweak my statusline to show both the clock and the battery level.

I manily got inspired by Build your own Vim statusline by George Ornbo, but I added a new feature by Vim 8: timer_start(), which allows to call a function after a specified time interval.

Here’s the code to throw into your .vimrc:

And here’s the result:

Screenshot from 2018-02-16 16-13-28.png

Happy Hacking!

Image result for rss Subscribe to RSS Feed here

Image result for twitter Follow me on Twitter

Image result for github icon Check the code on GitHub