如何使用vim-youcompleteme
我从Ubuntu的软件中心下载了vim-youcompleteme
。 但我不知道如何让它发挥作用。 当我重新启动vim并进行测试时,没有发生任何特殊情况。 和vim-syntastic
是一样的。 有人能告诉我如何使它们工作吗? 我应该用~/.vimrc
做点什么吗? 提前致谢!
从特定于包的README( /usr/share/doc/vim-youcompleteme/README.Debian
):
vim-youcompleteme ----------------- A code completion plugin for Vim. This package designed to work with vim-addon-manager. To use this addon install vim-addon-manager package first and use this command: $ vam install youcompleteme
当vim-youcompleteme
,推荐使用vim-addon-manager
,因此很有可能已经安装了它。 如果不:
sudo apt-get install vim-addon-manager
然后运行README中给出的命令。 vim-syntastic
仅适用于14.10,来自包索引的结果,但鉴于它明确依赖于vim-addon-manager
,我会说类似的东西也适用于它。
尝试这样的事情:
将它放在.vimrc的顶部以使用Vundle。
set nocompatible " be iMproved, required filetype off " required " set the runtime path to include Vundle and initialize set rtp+=~/.vim/bundle/Vundle.vim call vundle#begin() " alternatively, pass a path where Vundle should install plugins "call vundle#begin('~/some/path/here') " let Vundle manage Vundle, required Plugin 'VundleVim/Vundle.vim' " All of your Plugins must be added before the following line call vundle#end() " required filetype plugin indent on " required
运行以下安装:
git clone https://github.com/VundleVim/Vundle.vim.git ~/.vim/bundle/Vundle.vim cd ~/.vim/bundle git clone https://github.com/Valloric/YouCompleteMe.git cd YouCompleteMe git submodule update --init --recursive ./install.sh --clang-completer
在18.04它只是;
sudo apt install vim-youcompleteme vim-addon-manager install youcompleteme
ubuntu版本不支持Java,因此您可能需要最新版本,具体取决于您的选择语言,因此可以选择;
cd ~/.vim/bundle git clone --depth=1 https://github.com/Valloric/YouCompleteMe.git cd YouCompleteMe git submodule update --init --recursive ./install.py --all