From 7ce7aae09dab2195f5a337c2df9faff955633e81 Mon Sep 17 00:00:00 2001 From: Johannes Ranke Date: Wed, 2 Nov 2016 15:09:57 +0100 Subject: Use the airline plugin, show SyntaxItem --- vimrc | 31 ++++++++++++------------------- 1 file changed, 12 insertions(+), 19 deletions(-) diff --git a/vimrc b/vimrc index e1c59d7..8d253f8 100644 --- a/vimrc +++ b/vimrc @@ -21,6 +21,10 @@ Plug 'hrp/EnhancedCommentify' Plug 'jalvesaq/R-Vim-runtime' Plug 'jranke/vim-pandoc', { 'branch': 'rmd' } Plug 'vim-pandoc/vim-pandoc-syntax' +Plug 'vim-airline/vim-airline' +Plug 'vim-airline/vim-airline-themes' +Plug 'airblade/vim-gitgutter' + " R plugin {{{2 " for vim versions <= 7.4.1453 use the legacy plugin " Note that on wheezy, vim is too old even for that @@ -94,23 +98,12 @@ function! SyntaxItem() return synIDattr(synID(line("."),col("."),1),"name") endfunction -" Status line {{{1 -if has('statusline') - set statusline=%#Question# " set highlighting - set statusline+=%-2.2n\ " buffer number - set statusline+=%#WarningMsg# " set highlighting - set statusline+=%f\ " file name - set statusline+=%#Question# " set highlighting - set statusline+=%h%m%r%w\ " flags - set statusline+=%{strlen(&ft)?&ft:'none'}, " file type - set statusline+=%{(&fenc==\"\"?&enc:&fenc)}, " encoding - set statusline+=%{((exists(\"+bomb\")\ &&\ &bomb)?\"B,\":\"\")} " BOM - set statusline+=%{&fileformat}, " file format - set statusline+=%{&spelllang}, " language of spelling checker - set statusline+=%{SyntaxItem()} " syntax highlight group under cursor - set statusline+=%= " ident to the right - set statusline+=0x%-8B\ " character code under cursor - set statusline+=%-7.(%l,%c%V%)\ %<%P " cursor position/offset -endif - +" Airline {{{1 +let g:airline#extensions#tabline#enabled = 1 +let g:airline_powerline_fonts = 1 +let g:airline#extensions#branch#enabled = 1 +let g:airline_theme='wombat' +call airline#parts#define_function('syntax', 'SyntaxItem') +let g:airline_section_x=airline#section#create_right(['syntax', 'filetype']) +" Always show statusline {{{1 set laststatus=2 -- cgit v1.2.1