Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/enricobacis/vim-airline-clock
⏱ vim-airline clock extension - for people that easily loose the sense of time in fullscreen vim sessions
https://github.com/enricobacis/vim-airline-clock
Last synced: about 2 months ago
JSON representation
⏱ vim-airline clock extension - for people that easily loose the sense of time in fullscreen vim sessions
- Host: GitHub
- URL: https://github.com/enricobacis/vim-airline-clock
- Owner: enricobacis
- License: mit
- Created: 2016-12-26T22:09:08.000Z (almost 8 years ago)
- Default Branch: master
- Last Pushed: 2021-04-14T09:21:19.000Z (over 3 years ago)
- Last Synced: 2023-03-13T14:26:32.118Z (almost 2 years ago)
- Language: Vim script
- Homepage:
- Size: 67.4 KB
- Stars: 52
- Watchers: 3
- Forks: 3
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# vim-airline-clock
[vim-airline](https://github.com/bling/vim-airline) clock extension -
*for people that easily loose the sense of time in fullscreen vim sessions*![vim-airline-clock](https://raw.github.com/enricobacis/vim-airline-clock/master/.screenshot/vim-airline-clock.png)
## requirements
* [vim-airline](https://github.com/bling/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](https://github.com/junegunn/vim-plug),
[Vundle](https://github.com/VundleVim/Vundle.vim),
[pathogen](https://github.com/tpope/vim-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```vim
let g:airline#extensions#clock#auto = 0
```* If you want to change the clock format
```vim
let g:airline#extensions#clock#format = '%H:%M:%S'
```The formatting is done by the
[`strftime`](http://vimdoc.sourceforge.net/htmldoc/eval.html#strftime())
function. Check its documentation for the accepted format.* If you want to change the updatetime (in milliseconds)
```vim
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
```vim
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.