git clone https://github.com/gmarik/Vundle.vim.git ~/.vim/bundle/Vundle.vim
vi .vimrc
set nocompatible "去除VIM一致性,必须"
filetype off "必须"
"设置包括vundle和初始化相关的运行时路径"
set rtp+=~/.vim/bundle/Vundle.vim
call vundle#begin()
"启用vundle管理插件,必须"
Plugin 'VundleVim/Vundle.vim'
"在此增加其他插件,安装的插件需要放在vundle#begin和vundle#end之间"
"安装github上的插件格式为 Plugin '用户名/插件仓库名'"
call vundle#end()
filetype plugin indent on "加载vim自带和插件相应的语法和文件类型相关脚本,必须"
安装YouCompleteMe
git clone https://github.com/Valloric/YouCompleteMe.git ~/.vim/bundle/YouCompleteMe
cd ~/.vim/bundle/YouCompleteMe
git submodule update --init --recursive
vim ~/.vimrc
call vundle#begin()
和call vundle#end()
之间添加Plugin 'Valloric/YouCompleteMe'
wq保存并退出
打开vim
输入:PluginInsttall
cd ~/.vim/bundle/YouCompleteMe
git submodule update --init --recursive
./install.py --clang-completer
进入vimrc下方添加
let g:ycm_global_ycm_extra_conf='~/.vim/bundle/YouCompleteMe/third_party/ycmd/.ycm_extra_conf.py'
安装python3.6和新版vim
python3.6
yum install zlib-devel bzip2-devel openssl-devel ncurses-devel sqlite-devel readline-devel tk-devel gdbm-devel db4-devel libpcap-devel xz-devel libffi-devel
wget https://www.python.org/ftp/python/3.5.1/Python-3.5.1.tgz
tar -zxvf Python-3.5.1.tgz
cd Python-3.5.1
make
make install
ln -s /usr/local/python3/bin/python3 /usr/bin/python3
vim ~/.bash_profile
PATH
=
$PATH:$HOME
/
bin
:
/
usr
/
local
/
python3
/
bin(路径)
source ~/.bash_profile
检查安装是否完成
python3 -V
pip3 -V
vim
git clone https://github.com/vim/vim.git
./configure --with-features=huge --enable-multibyte --enable-rubyinterp=yes --enable-python3interp=yes --prefix=/usr/local/vim
查看vim是否支持python
vim --version |grep python
VIM: 解决Delete(backspace)按键失效问题
打开vim,输入
:set backspace
如果出现的是
backspace=
那么就是backspace为空导致的了, 解决方法很简单,在.vimrc中加入
set backspace=2
其他相关设置
"语法高亮(显示彩色)
syntax on
"显示行号
set nu
取消自动预览
set completeopt-=preview
解决颜色没有的问题:
解决办法:打开shell配置文件,.bash_profile或.bashrc加入下面一行
TERM=xterm export TERM
source ~/.bashrc
参考:
https://blog.csdn.net/weixin_44638957/article/details/91985270
https://blog.csdn.net/liao20081228/article/details/80347889
https://blog.csdn.net/weixin_34112208/article/details/93426643
https://www.cnblogs.com/CoalberSoft/p/5508684.html
https://blog.csdn.net/xingxu0207/article/details/74568271
https://www.cnblogs.com/softwaretesting/archive/2012/01/10/2317820.html