From 275bfc1a94f9200fc5bfc97866ac68724e9443d7 Mon Sep 17 00:00:00 2001 From: lhark Date: Sun, 24 Feb 2019 22:19:53 -0500 Subject: [PATCH] [vim] Port minimal Vundle setup from old vimrc --- vimrc | 62 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 62 insertions(+) diff --git a/vimrc b/vimrc index a7aff21..f382579 100644 --- a/vimrc +++ b/vimrc @@ -1,4 +1,66 @@ set nocompatible +if &shell =~# 'fish$' + set shell=sh +endif +"[Use Plug-ins and Plug-in Manager(Vundle) only on UNIX or MAC OS]" +if has("unix") || has("mac") + filetype off + "[Download and install Vundle Plug-in Manager]" + if !isdirectory(expand("$HOME/.vim/bundle")) + silent !mkdir -p $HOME/.vim/bundle + silent cd $HOME/.vim/bundle + silent !git clone https://github.com/gmarik/Vundle.vim.git + silent cd $HOME + endif + "[Run Plug-ins]" + set runtimepath+=$HOME/.vim/bundle/Vundle.vim + call vundle#begin() + Plugin 'gmarik/Vundle.vim' + map :VundleUpdate + Plugin 'dag/vim-fish' + Plugin 'w0rp/ale' + let g:ale_linters = { + \ 'cpp': ['g++'], + \ 'c': ['clang'] + \ } + let g:ale_c_gcc_options='-std=c99 -pedantic' + let g:ale_sign_error = '●' + let g:ale_sign_warning = '●' + Plugin 'itchyny/lightline.vim' + let g:lightline = { + \ 'active': { + \ 'left': [['mode', 'paste'], ['filename', 'modified']], + \ 'right': [['lineinfo'], + \ ['percent'], + \ ['readonly', 'linter_warnings', 'linter_errors', 'linter_ok'], + \ ['fileformat'], + \ ['fileencoding'] + \ ] + \ }, + \ 'component_expand': { + \ 'linter_warnings': 'LightlineLinterWarnings', + \ 'linter_errors': 'LightlineLinterErrors', + \ 'linter_ok': 'LightlineLinterOK', + \ 'lineinfo': 'LineInfo' + \ }, + \ 'component_type': { + \ 'readonly': 'error', + \ 'linter_warnings': 'warning', + \ 'linter_errors': 'error' + \ }, + \} + if executable('ctags') + Plugin 'ludovicchabant/vim-gutentags' + endif + Plugin 'beyondmarc/opengl.vim' + Plugin 'tikhomirov/vim-glsl' + Plugin 'jamessan/vim-gnupg' + "[Autodetect indent style of a file]" + Plugin 'tcbbd/detectindent' + let g:detectindent_preferred_indent=4 + let g:detectindent_autodetect=1 + call vundle#end() +endif " Allow backspacing over everything in insert mode. set backspace=indent,eol,start set number