From 5bf9ace8fbb2274e4d417a250cf232151cdd1b31 Mon Sep 17 00:00:00 2001 From: bretello Date: Mon, 7 Dec 2020 15:36:18 +0100 Subject: [PATCH] vim: replace lightline with airline --- vim/plugins_config.vim | 50 ++++++++++++++++++------------------------ vim/plugs.vim | 7 +++--- 2 files changed, 24 insertions(+), 33 deletions(-) diff --git a/vim/plugins_config.vim b/vim/plugins_config.vim index 6aa0c37..a5be7e8 100644 --- a/vim/plugins_config.vim +++ b/vim/plugins_config.vim @@ -87,35 +87,27 @@ let g:gitgutter_sign_modified_removed = 'x' " highlight DiffChange cterm=bold ctermfg=10 ctermbg=17 gui=none guifg=bg guibg=Red " highlight DiffText cterm=bold ctermfg=10 ctermbg=88 gui=none guifg=bg guibg=Red -" Lightline config from amix's vimrc " TODO: this could be improved -let g:lightline = { - \ 'colorscheme': 'wombat', - \ 'active': { - \ 'left': [ ['mode', 'paste'], - \ ['fugitive', 'readonly', 'filename', 'modified'] ], - \ 'right': [ [ 'lineinfo' ], ['percent'] ] - \ }, - \ 'component': { - \ 'readonly': '%{&filetype=="help"?"":&readonly?"¿":""}', - \ 'modified': '%{&filetype=="help"?"":&modified?"+":&modifiable?"":"-"}', - \ 'fugitive': '%{exists("*FugitiveHead")?FugitiveHead():""}' - \ }, - \ 'component_visible_condition': { - \ 'readonly': '(&filetype!="help"&& &readonly)', - \ 'modified': '(&filetype!="help"&&(&modified||!&modifiable))', - \ 'fugitive': '(exists("*FugitiveHead") && ""!=FugitiveHead())' - \ }, - \ 'separator': { 'left': ' ', 'right': ' ' }, - \ 'subseparator': { 'left': ' ', 'right': ' ' } - \ } - -let g:lightline.component_expand = { - \ 'linter_checking': 'lightline#ale#checking', - \ 'linter_infos': 'lightline#ale#infos', - \ 'linter_warnings': 'lightline#ale#warnings', - \ 'linter_errors': 'lightline#ale#errors', - \ 'linter_ok': 'lightline#ale#ok', - \ } +" Airline config +set laststatus=2 +let g:airline#extensions#tabline#enabled = 1 +let g:airline_theme='gruvbox' +" " default linenr symbol is '☰' and it sucks +" let g:airline_symbols.linenr = '' +" " powerline symbols +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 = {} +let g:airline_symbols.branch = '' +let g:airline_symbols.readonly = '' +"let g:airline_symbols.linenr = '☰' +let g:airline_symbols.linenr = '' +"let g:airline_symbols.maxlinenr = '' +" let g:airline_symbols.dirty='⚡' " These are the default mappings for vim-multi-cursor let g:multi_cursor_start_word_key = '' diff --git a/vim/plugs.vim b/vim/plugs.vim index 8cbacad..354b6bf 100644 --- a/vim/plugs.vim +++ b/vim/plugs.vim @@ -21,10 +21,9 @@ Plug 'https://github.com/tpope/vim-fugitive' Plug 'https://github.com/tpope/vim-commentary' " Browse file system Plug 'https://github.com/scrooloose/nerdtree', { 'on': 'NERDTreeToggle' } -" Minimal status line -Plug 'https://github.com/itchyny/lightline.vim' -" Lightline status for ALE -Plug 'maximbaz/lightline-ale' +" status line +Plug 'vim-airline/vim-airline' +Plug 'vim-airline/vim-airline-themes' " Insert parentheses in pairs Plug 'https://github.com/jiangmiao/auto-pairs' Plug 'https://github.com/amix/open_file_under_cursor.vim'