1
0
Fork 0

replace lightline-buffer with lightline-bufferline

This commit is contained in:
Massaki Archambault 2018-07-04 09:40:42 -04:00
parent f0f578efe8
commit 50be442ef2
1 changed files with 25 additions and 17 deletions

View File

@ -5,6 +5,8 @@ syntax on
set number set number
" highlight " highlight
set cursorline set cursorline
" Encoding
set encoding=UTF-8
" Auto-indentation " Auto-indentation
set ai set ai
set tabstop=4 set tabstop=4
@ -58,7 +60,8 @@ if dein#load_state(pluginpath)
" Interface " Interface
call dein#add("itchyny/lightline.vim") call dein#add("itchyny/lightline.vim")
call dein#add('taohex/lightline-buffer') call dein#add('mgee/lightline-bufferline')
call dein#add('ryanoasis/vim-devicons')
call dein#add("airblade/vim-gitgutter") call dein#add("airblade/vim-gitgutter")
call dein#add("christoomey/vim-tmux-navigator") call dein#add("christoomey/vim-tmux-navigator")
call dein#add("scrooloose/nerdtree") call dein#add("scrooloose/nerdtree")
@ -144,18 +147,12 @@ let g:lightline = {
\ [ 'linter_errors' ], \ [ 'linter_errors' ],
\ [ 'fileformat', 'fileencoding', 'filetype', 'linter_ok', 'linter_warnings' ] ], \ [ 'fileformat', 'fileencoding', 'filetype', 'linter_ok', 'linter_warnings' ] ],
\ }, \ },
\ 'tabline': {
\ 'left': [ [ 'bufferinfo' ], [ 'bufferbefore', 'buffercurrent', 'bufferafter' ], ],
\ 'right': [ ],
\ },
\ 'component_expand': { \ 'component_expand': {
\ 'buffercurrent': 'lightline#buffer#buffercurrent2',
\ 'linter_warnings': 'LightlineLinterWarnings', \ 'linter_warnings': 'LightlineLinterWarnings',
\ 'linter_errors': 'LightlineLinterErrors', \ 'linter_errors': 'LightlineLinterErrors',
\ 'linter_ok': 'LightlineLinterOK' \ 'linter_ok': 'LightlineLinterOK'
\ }, \ },
\ 'component_type': { \ 'component_type': {
\ 'buffercurrent': 'tabsel',
\ 'readonly': 'error', \ 'readonly': 'error',
\ 'linter_errors': 'error', \ 'linter_errors': 'error',
\ 'linter_warning': 'warning', \ 'linter_warning': 'warning',
@ -163,12 +160,21 @@ let g:lightline = {
\ 'component_function': { \ 'component_function': {
\ 'filename': 'LightlineFilename', \ 'filename': 'LightlineFilename',
\ 'ctrlpmark': 'CtrlPMark', \ 'ctrlpmark': 'CtrlPMark',
\ 'bufferbefore': 'lightline#buffer#bufferbefore',
\ 'bufferafter': 'lightline#buffer#bufferafter',
\ 'bufferinfo': 'lightline#buffer#bufferinfo',
\ }, \ },
\ } \ }
"lightline-bufferline
let g:lightline#bufferline#show_number=2
let g:lightline#bufferline#number_map = {
\ 0: '⁰', 1: '¹', 2: '²', 3: '³', 4: '⁴',
\ 5: '⁵', 6: '⁶', 7: '⁷', 8: '⁸', 9: '⁹'
\ }
let g:lightline#bufferline#enable_devicons=1
let g:lightline#bufferline#min_buffer_count=2
let g:lightline.tabline = {'left': [['buffers']], 'right': []}
let g:lightline.component_expand = {'buffers': 'lightline#bufferline#buffers'}
let g:lightline.component_type = {'buffers': 'tabsel'}
function! LightlineFilename() function! LightlineFilename()
let filename = expand('%:t') !=# '' ? expand('%:t') : '[No Name]' let filename = expand('%:t') !=# '' ? expand('%:t') : '[No Name]'
let modified = &modified ? ' +' : '' let modified = &modified ? ' +' : ''
@ -219,9 +225,11 @@ endfunction
colorscheme spacegray colorscheme spacegray
" 16 millions colors " 16 millions colors
"set termguicolors "set termguicolors
" Disable background " Disable background in terminal
"hi Normal guibg=NONE ctermbg=NONE hi Normal ctermbg=NONE
let g:spacegray_underline_search = 1
" Those don't seem to do anything in xterm
"let g:spacegray_underline_search = 1
"let g:spacegray_italicize_comments = 1 "let g:spacegray_italicize_comments = 1
" Italic comments " Italic comments