From 6f289cc30bfe99a782459267c3339bdebc2ac733 Mon Sep 17 00:00:00 2001 From: Julian Scharrenbach Date: Mon, 11 Dec 2017 11:27:46 +0100 Subject: [PATCH] removed vim-airline from .vimrc and replaced by native vim-script --- .vimrc | 34 +++++++++++++++++++++++++++------- 1 file changed, 27 insertions(+), 7 deletions(-) diff --git a/.vimrc b/.vimrc index a2101d2..ee425e2 100644 --- a/.vimrc +++ b/.vimrc @@ -121,10 +121,30 @@ if ! &diff let g:syntastic_check_on_wq = 1 endif -" vim-plug plugins -call plug#begin('~/.vim/plugged') -"Plug 'vim-airline/vim-airline' -Plug 'bling/vim-airline' -Plug 'vim-airline/vim-airline-themes' -call plug#end() -let g:airline_theme='minimalist' +"tweaking my statusline + +function! GitBranch() + return system("git rev-parse --abbrev-ref HEAD 2>/dev/null | tr -d '\n'") + endfunction + +function! StatuslineGit() + let l:branchname = GitBranch() + return strlen(l:branchname) > 0?' '.l:branchname.' ':'' + endfunction + +set laststatus=2 "always show statusline + +set statusline= +set statusline+=%#PmenuSel# +set statusline+=%{StatuslineGit()} +set statusline+=%#LineNr# +set statusline+=\ %f +set statusline+=%m\ +set statusline+=%= +set statusline+=%#CursorColumn# +set statusline+=\ %y +set statusline+=\ %{&fileencoding?&fileencoding:&encoding} +set statusline+=\[%{&fileformat}\] +set statusline+=\ %p%% +set statusline+=\ %l:%c +set statusline+=\