From 1d4561690b8a267cd0ebf909a37f4ed320433a53 Mon Sep 17 00:00:00 2001 From: Oxbian Date: Sun, 8 Oct 2023 12:16:11 +0200 Subject: Removing vim-airline and using custom statusline --- vim/plugins.vim | 48 ++++++++++++++++++++++++++++++++---------------- 1 file changed, 32 insertions(+), 16 deletions(-) (limited to 'vim/plugins.vim') diff --git a/vim/plugins.vim b/vim/plugins.vim index 1fbe15b..aa9754a 100644 --- a/vim/plugins.vim +++ b/vim/plugins.vim @@ -16,8 +16,6 @@ call plug#begin('~/.vim/plugged') " UI & Themes Plug 'joshdick/onedark.vim' " Onedark themes for vim -Plug 'vim-airline/vim-airline' " Vim statusline -Plug 'ryanoasis/vim-devicons' " Devicons Plug 'liuchengxu/vim-which-key' " Show leader mapping cheatsheet " Git integration @@ -42,21 +40,39 @@ filetype plugin indent on " Allow filetype detection, plugins, indentation """"""""""""""""""""""""" " Configuration """"""""""""""""""""""""" -" VIM airline -let g:airline_theme='onedark' " Status line color & configuration +" Netrw (filetree built-in vim) +let g:netrw_keepdir = 0 " Reload buffer usefull when moving or removing file +let g:netrw_winsize = 10 " Size of filetree buffer +let g:netrw_banner = 0 " Removing netrw banner +let g:netrw_localcopydircmd = 'cp -r' " Changing copy command to add recursive copy + +" Statusline +let g:currentmode={ + \ 'n' : 'NORMAL ', + \ 'v' : 'VISUAL ', + \ 'V' : 'V·Line ', + \ "\" : 'V·Block ', + \ 'i' : 'INSERT ', + \ 'R' : 'R ', + \ 'Rv' : 'V·Replace ', + \ 'c' : 'Command ', + \} +set laststatus=2 +set statusline= +" VIM Mode +set statusline+=\ %{toupper(g:currentmode[mode()])}%{&spell?'[SPELL]':''}\| +" File (path, modified, readonly ? ) +set statusline+=%h\ %F +set statusline+=%{&modified?'\ [+]':''} +set statusline+=%{&readonly?'\ ':''} +" Filetype +set statusline+=%=%y +set statusline+=\ \|\ %{&fileencoding?&fileencoding:&encoding} +set statusline+=\ \|\ [%{&fileformat}\] +" Line count and percentage +set statusline+=\ \|\ %l:%c +set statusline+=\ [%p%%]\ -if !exists('g:airline_symbols') - let g:airline_symbols = {} -endif -let g:airline_symbols.colnr = ' ㏇:' -let g:airline_symbols.crypt = '🔒' -let g:airline_symbols.linenr = ' ¶' -let g:airline_symbols.maxlinenr = '' -let g:airline_symbols.branch = '⎇' -let g:airline_symbols.paste = 'ρ' -let g:airline_symbols.spell = 'Ꞩ' -let g:airline_symbols.notexists = 'Ɇ' -let g:airline_symbols.whitespace = ' Ξ' " VIM lsp let g:lsp_diagnostics_echo_cursor = 1 -- cgit v1.2.3