Ⅰ. 插件描述
A lightline.vim theme for onedark.vim colorschemeⅡ. 基本信息
|
Ⅲ. 安装方法
使用Vundle管理器安装
在你的.vimrc下添加:Plugin 'novadev94/lightline-onedark-lives-by-it'
… 然后在Vim中运行以下命令:
:source %
:PluginInstall
对于Vundle版本 < 0.10.2,请用上面的Bundle替换Plugin。
使用NeoBundle管理器安装
在你的.vimrc下添加:NeoBundle 'novadev94/lightline-onedark-lives-by-it'
… 然后在Vim中运行以下命令:
:source %
:NeoBundleInstall
使用VimPlug管理器安装
在你的.vimrc下添加:Plug 'novadev94/lightline-onedark-lives-by-it'
… 然后在Vim中运行以下命令:
:source %
:PlugInstall
使用Pathogen管理器安装
在终端中运行以下命令:cd ~/.vim/bundle
git clone https://github.com/novadev94/lightline-onedark
Ⅳ. 文档说明
# lightline-onedark
This is an itchyny/lightline.vim theme for joshdick/onedark.vim with extra support for bling/bufferline.vim integration.
All the used color codes are extracted from the original joshdick/onedark.vim theme, so the appearance should look consistent.
Screenshot

Installation
- You can install this manually by putting it under
$VIMfolder or using any package manager of your choice (vim-plug, Vundle, Pathogen, NeoBundle,...) Add this theme to your lightline configuration in your
.vimrcusing the theme nameonedark.- If you haven't had your customized lightline configuration yet
let g:lightline.colorscheme = 'onedark'- If you've already had one
let g:lightline = { \ 'colorscheme': 'onedark', \ }
Configuration
Available Options
g:lightline#onedark#disable_bold_style_(Default - 0)_: Do not use bold style.
bufferline.vim integration
Some customizations are also added to support integration with bling/bufferline.vim. Other than the default tabsel, you can use bufsel (selected buffer) and tabsep (separator between tabs & buffers) in your lightline component_type.
See Example for more details.
Example
This is extracted from my own .vimrc. This also shows the integration with bufferline.
If you have some problems of buffers on tab line not switching properly. Please checkout my fork here NovaDev94/bufferline.
let g:bufferline_echo = 0
let g:bufferline_modified = ' ✱'
let g:bufferline_show_bufnr = 0
let g:bufferline_unnamed_buffer = '[No Name]'
let g:bufferline_separator = ' '
let g:bufferline_active_buffer_left = ''
let g:bufferline_active_buffer_right = ''
let g:lightline =
\ {
\ 'colorscheme': 'onedark',
\ 'tabline': {
\ 'left': [ [ 'tabs', 'tablinesep', 'bufferline'] ],
\ 'right': [ [ 'folder' ] ]
\ },
\ 'tab': {
\ 'active': [ 'tabnum' ],
\ 'inactive': [ 'tabnum' ]
\ },
\ 'component_expand': {
\ 'bufferline': 'MyBufferline',
\ 'tablinesep': 'MyTablineSep'
\ },
\ 'component_type': {
\ 'bufferline': 'bufsel',
\ 'tablinesep': 'tabsep'
\ },
\ 'tabline_subseparator': { 'left': '', 'right': '' },
\ 'tabline_separator': { 'left': '', 'right': '' },
\ }
function! MyTablineSep()
return tabpagenr('$') > 1 ? ['', '●', ''] : ''
endfunction
function! MyBufferline()
call bufferline#refresh_status()
let buffers = [
\ g:bufferline_status_info.before,
\ g:bufferline_status_info.current,
\ g:bufferline_status_info.after
\ ]
call map(buffers, 's:strip(v:val)')
return buffers
endfunction