Skip to content
Snippets Groups Projects
Commit eee8f283 authored by Jody Foo's avatar Jody Foo
Browse files

Merge branch 'master' of gitlab.liu.se:hcs-rpi/rpi-idstudio-setup

parents d7bc26b7 c23dbf84
No related branches found
No related tags found
No related merge requests found
...@@ -2,6 +2,13 @@ ...@@ -2,6 +2,13 @@
set nocompatible set nocompatible
" automatic install of vim-plug. https://github.com/junegunn/vim-plug/wiki/tips#automatic-installation
let data_dir = has('nvim') ? stdpath('data') . '/site' : '~/.vim'
if empty(glob(data_dir . '/autoload/plug.vim'))
silent execute '!curl -fLo '.data_dir.'/autoload/plug.vim --create-dirs https://raw.githubusercontent.com/junegunn/vim-plug/master/plug.vim'
autocmd VimEnter * PlugInstall --sync | source $MYVIMRC
endif
" vim-plug config, https://github.com/junegunn/vim-plug {{{1 " vim-plug config, https://github.com/junegunn/vim-plug {{{1
call plug#begin('~/.vim/plugged') call plug#begin('~/.vim/plugged')
Plug 'junegunn/vim-plug' " for help on vim-plug Plug 'junegunn/vim-plug' " for help on vim-plug
...@@ -159,15 +166,7 @@ let g:xml_syntax_folding=1 " enable syntax folding for xml files ...@@ -159,15 +166,7 @@ let g:xml_syntax_folding=1 " enable syntax folding for xml files
" STATUS LINE {{{2 " STATUS LINE {{{2
" Stuff from https://shapeshed.com/vim-statuslines/ " TODO: statusline stuff from https://shapeshed.com/vim-statuslines/
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
" clear statusline " clear statusline
set statusline= set statusline=
...@@ -175,7 +174,6 @@ set statusline= ...@@ -175,7 +174,6 @@ set statusline=
" set color to PmenuSel " set color to PmenuSel
"set statusline+=%#PmenuSel# "set statusline+=%#PmenuSel#
set statusline+=%{StatuslineGit()} " add git branch
"set statusline+=%#LineNr# " set color to LineNr "set statusline+=%#LineNr# " set color to LineNr
set statusline+=\ %f " add path to current file set statusline+=\ %f " add path to current file
set statusline+=%m\ " add modified flag set statusline+=%m\ " add modified flag
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment