To uninstall Vim 8.0 and downgrade it to the stock version in Ubuntu repository, run the command below to purge the PPA:html
sudo apt install ppa-purge &;&; sudo ppa-purge ppa:jonathonf/vimpython
https://www.cnblogs.com/zjutzz/p/9038871.html Ubuntu16.04安裝vim8 在Ubuntu16.04下編譯安裝vim8,並配置vim-plug插件管理器,以及安裝YouCompleteMe等插件。git
安裝依賴 sudo apt-get install libncurses5-dev libgnome2-dev libgnomeui-dev
libgtk2.0-dev libatk1.0-dev libbonoboui2-dev
libcairo2-dev libx11-dev libxpm-dev libxt-dev python-dev
python3-dev ruby-dev liblua5.1 lua5.1-dev libperl-dev git 須要注意的是在Ubuntu16.04中Lua應該爲liblua5.1-dev,而在其它版本中應爲lua5.1-devgithub
刪除已有vim相關包 dpkg -l | grep vim sudo apt remove vim vim-common vim-runtime vim-tiny 下載最新vim並編譯安裝 git clone https://github.com/vim/vim.gitvim
./configure --with-features=huge
--enable-multibyte
--enable-rubyinterp=yes
--enable-pythoninterp=yes
--with-python-config-dir=/usr/lib/python2.7/config
--enable-perlinterp=yes
--enable-luainterp=yes
--enable-gui=gtk2 --enable-cscope --prefix=/usrruby
make VIMRUNTIMEDIR=/usr/share/vim/vim80 -j5python2.7
sudo make install 配置vim 不配置vim的話會比較難用,增長一些插件和我的習慣性的定製能提高編碼效率。異步
在下載安裝vim插件這件事兒上,Vundle很慢,基於異步的vim-plug則很是快。上手吧:vim ~/.vimrc, 輸入vim指令:set paste,將以下內容粘貼到.vimrc中:ide
" Specify a directory for plugins " - For Neovim: ~/.local/share/nvim/plugged " - Avoid using standard Vim directory names like 'plugin' call plug#begin('~/.vim/plugged')post
" Make sure you use single quotes
" Shorthand notation; fetches https://github.com/junegunn/vim-easy-align Plug 'junegunn/vim-easy-align'
" Any valid git URL is allowed Plug 'https://github.com/junegunn/vim-github-dashboard.git'
" Multiple Plug commands can be written in a single line using | separators Plug 'SirVer/ultisnips' | Plug 'honza/vim-snippets'
" On-demand loading Plug 'scrooloose/nerdtree', { 'on': 'NERDTreeToggle' } Plug 'tpope/vim-fireplace', { 'for': 'clojure' }
" Using a non-master branch Plug 'rdnetto/YCM-Generator', { 'branch': 'stable' }
" Using a tagged release; wildcard allowed (requires git 1.9.2 or above) Plug 'fatih/vim-go', { 'tag': '*' }
" Plugin options Plug 'nsf/gocode', { 'tag': 'v.20150303', 'rtp': 'vim' }
" Plugin outside ~/.vim/plugged with post-update hook Plug 'junegunn/fzf', { 'dir': '~/.fzf', 'do': './install --all' } Plug 'Valloric/YouCompleteMe', { 'do': './install.py' }
" Unmanaged plugin (manually installed and updated) Plug '~/my-prototype-plugin'
" Initialize plugin system call plug#end()
"" 我的定製的一些配置,不喜歡、不習慣能夠自行修改 set nu set tags=./.tags;.tags set cursorline set showmatch set hlsearch set incsearch hi CursorLine cterm=NONE ctermbg=black ctermfg=green guibg=NONE guifg=NONE 關閉vim,再次vim ~/.vimrc,敲入:PlugInstall,開始下載插件:能夠看到各個插件是同時在下載的,速度很快。
其中YouCompleteMe由於有不少submodule,很容易下載失敗,因此手動處理一下:
cd ~/.vim/plugged/YouCompleteMe
git submodule update --init --recursive
python install.py 參考 https://blog.csdn.net/keith_bb/article/details/69788343