-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathconfigure_vim_for_syntastic.sh
40 lines (31 loc) · 1.07 KB
/
configure_vim_for_syntastic.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
#!/usr/bin/env bash
set -eu
BUNDLE_DIR=~/.vim/bundle
VIMRC=~/.vimrc
ENV_NAME=_vim
export PATH="$(dirname $(bash -ic 'which conda')):$PATH"
function install_syntastic_for_pathogen {
# FIXME: needs a check for conda and appropriate action if not installed
# requires: conda install flake8
SYNTASTIC_URL=https://github.com/scrooloose/syntastic.git
mkdir -p $BUNDLE_DIR && cd $BUNDLE_DIR
git clone $SYNTASTIC_URL
if [[ -z $(conda list --name $ENV_NAME 2>/dev/null) ]]; then
conda create --name $ENV_NAME flake8 --yes --quiet
fi
set +u
WHICH_FLAKE8=$(source activate $ENV_NAME && which flake8)
WHICH_PYTHON=$(source activate $ENV_NAME && which python)
set -u
echo "
\" speed up after write by only using flake8 by default
let syntastic_python_checkers = ['flake8']
let syntastic_python_flake8_exec = '$WHICH_FLAKE8'
\" https://github.com/vim-syntastic/syntastic#3-recommended-settings
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
" >> $VIMRC
}
install_syntastic_for_pathogen