[vim] Port minimal Vundle setup from old vimrc

This commit is contained in:
lhark 2019-02-24 22:19:53 -05:00
parent 9a6e082862
commit 275bfc1a94

62
vimrc
View file

@ -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 <F3> :VundleUpdate<CR>
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