Windows XP Windows 7 Windows 2003 Windows Vista Windows教程綜合 Linux 系統教程
Windows 10 Windows 8 Windows 2008 Windows NT Windows Server 電腦軟件教程
 Windows教程網 >> Linux系統教程 >> 關於Linux >> Linux系統Vim如何安裝YouCompleteMe插件

Linux系統Vim如何安裝YouCompleteMe插件

日期:2017/1/25 10:19:15      編輯:關於Linux

  在Linux系統中想要讓Vim編輯器發揮更大的作用,就要對給給它安裝一些插件。比如說YouCompleteMe插件(名字就很形象)。本文就來介紹一下Linux系統Vim如何安裝YouCompleteMe插件。

Linux系統Vim如何安裝YouCompleteMe插件

  編譯配置選項:

  。/configure --with-features=huge --enable-pythoninterp --enable-python3interp --enable-luainterp --enable-multibyte --enable-sniff --enable-fontset

  在我的機器上裝有python2.7.5 和 python3.3, 但加了enable-python3interp參數依然沒有支持py3,不知何故,先不管,YouCompleteMe 只要求有py2.6以上。

  安裝vundle插件

  git clone https://github.com/gmarik/vundle.git ~/.vim/bundle/vundle

  在.vimrc中配置

  set nocompatible “ be iMproved, required

  filetype off ” required

  “ set the runtime path to include Vundle and initialize

  set rtp+=~/.vim/bundle/vundle/

  call vundle#rc()

  ” alternatively, pass a path where Vundle should install plugins

  “let path = ‘~/some/path/here’

  ”call vundle#rc(path)

  “ let Vundle manage Vundle, required

  Plugin ‘gmarik/vundle’

  ” The following are examples of different formats supported.

  “ Keep Plugin commands between here and filetype plugin indent on.

  ” scripts on GitHub repos

  Plugin ‘tpope/vim-fugitive’

  Plugin ‘Lokaltog/vim-easymotion’

  Plugin ‘tpope/vim-rails.git’

  “ The sparkup vim script is in a subdirectory of this repo called vim.

  ” Pass the path to set the runtimepath properly.

  Plugin ‘rstacruz/sparkup’, {‘rtp’: ‘vim/’}

  “ scripts from http://vim-scripts.org/vim/scripts.html

  Plugin ‘L9’

  Plugin ‘FuzzyFinder’

  ” scripts not on GitHub

  Plugin ‘git://git.wincent.com/command-t.git’

  “ git repos on your local machine (i.e. when working on your own plugin)

  Plugin ‘file:///home/gmarik/path/to/plugin’

  ” 。。。

  filetype plugin indent on “ required

  Bundle ‘Valloric/YouCompleteMe’

  保存退出,打開vim,輸入 :BundleInstall 進行自動安裝 上一頁12下一頁共2頁

Copyright © Windows教程網 All Rights Reserved