#!/bin/bash
if [ ! -f ~/.vim/autoload/plug.vim ]; then
if command -v curl >/dev/null 2>&1; then
curl -fLo ~/.vim/autoload/plug.vim --create-dirs https://raw.githubusercontent.com/junegunn/vim-plug/master/plug.vim
elif command -v wget >/dev/null 2>&1; then
[ ! -d ~/.vim/autoload ] && mkdir -p ~/.vim/autoload
wget https://raw.githubusercontent.com/junegunn/vim-plug/master/plug.vim -O ~/.vim/autoload/plug.vim
else
echo "There is no wget or curl to download https://raw.githubusercontent.com/junegunn/vim-plug/master/plug.vim"
exit 1
fi
fi
if ! command -v shellcheck >/dev/null 2>&1; then
echo "Please install shellcheck."
fi
if ! command -v ctags >/dev/null 2>&1; then
echo "Please install ctags."
fi
if ! command -v flake8 >/dev/null 2>&1; then
echo "Please install flake8."
fi
if ! command -v git >/dev/null 2>&1; then
echo "Please install git."
exit 1
fi
cat > ~/.vimrc < CommentaryLine
vmap CommentaryLine
nmap CommentaryLine
vmap CommentaryLine
" for mh21/errormarker.vim
let &errorformat="%f:%l:%c: %t%*[^:]:%m,%f:%l: %t%*[^:]:%m," . &errorformat
set makeprg=LANGUAGE=C\\ make
" for vim-syntastic/syntastic
set statusline+=%#warningmsg#
set statusline+=%{SyntasticStatuslineFlag()}
set statusline+=%*
let g:syntastic_always_populate_loc_list = 1
let g:syntastic_auto_loc_list = 1
let g:syntastic_check_on_open = 1
let g:syntastic_check_on_wq = 0
let g:syntastic_sh_shellcheck_args = "-x"
let g:syntastic_python_checkers = ['flake8']
let g:syntastic_python_flake8_args = "--ignore=E501,W503,E203"
" for dense-analysis/ale
call ale#Set('python_flake8_options', '--ignore=E501,W503,E203')
" for vim-airline/vim-airline
if !exists('g:airline_symbols')
let g:airline_symbols = {}
endif
let g:airline_symbols.colnr = '@'
let g:airline_symbols.linenr = '('
let g:airline_symbols.maxlinenr = ')'
" My own preferred settings
set expandtab
set hlsearch
set number
set shiftwidth=4
set tabstop=4
highlight LineNr ctermfg=grey
highlight Search ctermfg=white ctermbg=darkyellow
" codeium plugin
let g:codeium_disable_bindings = 1
let g:codeium_enabled = v:false
imap