vim-airline-clock


Ⅰ. 插件描述

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

Ⅱ. 基本信息

创建日期:  2016-12-26
使用用户:  65
Github星:  42
插件作者:  Enrico Bacis

Ⅲ. 安装方法

使用Vundle管理器安装

在你的.vimrc下添加:
Plugin 'enricobacis/vim-airline-clock'
… 然后在Vim中运行以下命令:
:source %
:PluginInstall

对于Vundle版本 < 0.10.2,请用上面的Bundle替换Plugin。

使用NeoBundle管理器安装

在你的.vimrc下添加:
NeoBundle 'enricobacis/vim-airline-clock'
… 然后在Vim中运行以下命令:
:source %
:NeoBundleInstall

使用VimPlug管理器安装

在你的.vimrc下添加:
Plug 'enricobacis/vim-airline-clock'
… 然后在Vim中运行以下命令:
:source %
:PlugInstall

使用Pathogen管理器安装

在终端中运行以下命令:
cd ~/.vim/bundle
git clone https://github.com/enricobacis/vim-airline-clock

Ⅳ. 文档说明

# 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)

    1. 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.

    添加新评论