简单安装,站在好人的肩上
@H_403_2@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 <F5> <ESC>:!clear && javac *.java && java %:r<cr>
autocmd BufNewFile,BufReadPre *.py map <F5> <ESC>:!clear && python %<cr>
原文链接:https://www.f2er.com/bash/391612.html