Ⅰ. 插件描述
A solarized lightline themeⅡ. 基本信息
|
Ⅲ. 安装方法
使用Vundle管理器安装
在你的.vimrc下添加:Plugin 'pearofducks/vim-quack-lightline'
… 然后在Vim中运行以下命令:
:source %
:PluginInstall
对于Vundle版本 < 0.10.2,请用上面的Bundle替换Plugin。
使用NeoBundle管理器安装
在你的.vimrc下添加:NeoBundle 'pearofducks/vim-quack-lightline'
… 然后在Vim中运行以下命令:
:source %
:NeoBundleInstall
使用VimPlug管理器安装
在你的.vimrc下添加:Plug 'pearofducks/vim-quack-lightline'
… 然后在Vim中运行以下命令:
:source %
:PlugInstall
使用Pathogen管理器安装
在终端中运行以下命令:cd ~/.vim/bundle
git clone https://github.com/pearofducks/vim-quack-lightline
Ⅳ. 文档说明
vim-quack-lightline
A lightline theme with solarized colors

Installation
- Make sure you've already installed vim-lightline and probably the solarized colorscheme too.
- Add this repo to your favorite vim plugin manager.
- If you like the way the screenshots look, you'll want to add this block to your .vimrc:
let g:lightline = {
\ 'colorscheme': 'quack',
\ 'active': {
\ 'left': [ [ 'mode', 'paste' ],
\ [ 'fugitive'],[ 'filename' ] ]
\ },
\ 'component_function': {
\ 'fugitive': 'LLFugitive',
\ 'readonly': 'LLReadonly',
\ 'modified': 'LLModified',
\ 'filename': 'LLFilename',
\ 'mode': 'LLMode'
\ }
\ }
function! LLMode()
let fname = expand('%:t')
return fname == '__Tagbar__' ? 'Tagbar' :
\ fname == 'ControlP' ? 'CtrlP' :
\ lightline#mode() == 'NORMAL' ? 'N' :
\ lightline#mode() == 'INSERT' ? 'I' :
\ lightline#mode() == 'VISUAL' ? 'V' :
\ lightline#mode() == 'V-LINE' ? 'V' :
\ lightline#mode() == 'V-BLOCK' ? 'V' :
\ lightline#mode() == 'REPLACE' ? 'R' : lightline#mode()
endfunction
function! LLModified()
if &filetype == "help"
return ""
elseif &modified
return "+"
elseif &modifiable
return ""
else
return ""
endif
endfunction
function! LLReadonly()
if &filetype == "help"
return ""
elseif &readonly
return "!"
else
return ""
endif
endfunction
function! LLFugitive()
return exists('*fugitive#head') ? fugitive#head() : ''
endfunction
function! LLFilename()
return ('' != LLReadonly() ? LLReadonly() . ' ' : '') .
\ ('' != expand('%:t') ? expand('%:t') : '[No Name]') .
\ ('' != LLModified() ? ' ' . LLModified() : '')
endfunctionOther screenshots
Other images of the theme in action can be found here.