我的VIM

简单安装,站在好人的肩上

1.获得脚本

curl -O https://raw.githubusercontent.com/vince67/v7_config/master/vim.sh
或者创建一个vim.sh,写入以下内容:

#!/bin/bash
# install fisa vim config

echo '==============================='
echo 'start to install dependences...'
case "$OSTYPE" in
    darwin*)  brew install vim git pip curl;;
    linux*)   sudo apt-get install vim exuberant-ctags git pip curl;;
    *)        echo "unknown: OS: $OSTYPE, U should install dependences by yourself" ;;
esac
sudo pip install dbgp vim-debug pep8 flake8 pyflakes isort

echo '==============================='
echo 'start to download vimrc file...'
cp ~/.vimrc /tmp/vimrc.bak
curl -O https://raw.githubusercontent.com/fisadev/fisa-vim-config/master/.vimrc
mv .vimrc ~/.vimrc

echo '==============================='
echo 'start to install vim plugins...'
vim +BundleClean +BundleInstall! +qa

sudo chown $USER ~/.vim/
echo 'down! enjoy it!'

2.运行脚本

chmod +x vim.sh
./vim.sh

在.vimrc中加入自动运行Python、Go、Java等

autocmd BufNewFile,BufReadPre *.java map  :!clear && javac *.java && java %:r
autocmd BufNewFile,BufReadPre *.py map  :!clear && python %

你可能感兴趣的:(Python,Linux)