vim: replace airline with lightline

This commit is contained in:
Fernando Schauenburg 2021-01-03 22:21:05 +01:00
parent 9982f4bbb9
commit 06f8655392

View file

@ -108,28 +108,30 @@ call plug#begin('$XDG_DATA_HOME/vim/plugged')
let g:ctrlp_show_hidden = 1 " show hidden files
Plug 'scrooloose/nerdtree', { 'on': 'NERDTreeToggle' }
Plug 'tpope/vim-commentary'
Plug 'tpope/vim-fugitive'
Plug 'vim-airline/vim-airline'
Plug 'vim-airline/vim-airline-themes'
function! VimrcAirlineInit()
let g:airline_section_c = airline#section#create(['%{bufnr("%")}: %f %r%m'])
let g:airline_section_z = airline#section#create_right(['%p%%', '%l/%L', '%v'])
endfunction
autocmd User AirlineAfterInit call VimrcAirlineInit()
if !exists('g:airline_symbols')
let g:airline_symbols = {}
endif
let g:airline_left_sep = ' '
let g:airline_left_alt_sep = ''
let g:airline_right_sep = ' '
let g:airline_right_alt_sep = ''
let g:airline_symbols.crypt = 'C' " section A
let g:airline_symbols.spell = 'S' " section A
let g:airline_symbols.paste = 'P' " section A
let g:airline_symbols.branch = '' " section B
let g:airline_symbols.dirty = ' !' " section B, VCS: file changed
let g:airline_symbols.notexists = ' ?' " section B, VCS: file not tracked
let g:airline_symbols.whitespace = '✗' " section [...]
Plug 'itchyny/vim-gitbranch'
Plug 'itchyny/lightline.vim'
let g:lightline = {
\ 'colorscheme': 'solarized',
\ 'active': {
\ 'left': [
\ [ 'mode', 'paste' ],
\ [ 'gitbranch', 'readonly', 'modified' ],
\ [ 'relativepath' ],
\ ],
\ 'right': [
\ [ 'lineinfo' ],
\ [ 'percent' ],
\ [ 'filetype', 'fileencoding', 'fileformat' ],
\ ]
\ },
\ 'component_function': {
\ 'gitbranch': 'gitbranch#name',
\ },
\ 'subseparator': {
\ 'left': '',
\ 'right': '|',
\ },
\ }
Plug 'vim-scripts/srec.vim'
highlight link srecStart Comment
highlight link srecType Comment