Skip to content

⏱ vim-airline clock extension - for people that easily loose the sense of time in fullscreen vim sessions

License

Notifications You must be signed in to change notification settings

ACOTSAE/vim-airline-clock

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

17 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

vim-airline-clock

vim-airline clock extension - for people that easily loose the sense of time in fullscreen vim sessions

vim-airline-clock

requirements

  • vim-airline: This extension is based on vim-airline (like vim-powerline but faster)

installation

Install vim-airline-clock as any other plugin through the use of vim-plug, Vundle, pathogen or your favourite vim plugin manager. The plugin is enabled by default.

configuration

  • If you want to disable the clock from automatically being added to airline

    let g:airline#extensions#clock#auto = 0
  • If you want to change the clock format

    let g:airline#extensions#clock#format = '%H:%M:%S'

    The formatting is done by the strftime function. Check its documentation for the accepted format.

  • If you want to change the updatetime (in milliseconds)

    let g:airline#extensions#clock#updatetime = 1000

    The default value is the same as your updatetime (4000 milliseconds if you haven't changed it). You should consider lowering it to 1000 if you put seconds in your clock#format.

  • If you want to add clock to a different location in airline

    let g:airline#extensions#clock#auto = 0
    function! AirlineInit()
      let g:airline_section_z = airline#section#create(['clock', g:airline_symbols.space, g:airline_section_z])
    endfunction
    autocmd User AirlineAfterInit call AirlineInit()

updatetime timer

The updatetime option only work in vim version 8.0 and greater. In fact vim-airline-clock uses the native vim timer feature introduced in vim 8.0. The advantage is that no hack is needed in order to refresh the statusline.

About

⏱ vim-airline clock extension - for people that easily loose the sense of time in fullscreen vim sessions

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Vim Script 100.0%