Skip to content

Commit 1c52552

Browse files
committed
添加YCM插件的使用说明
1 parent 0a9e628 commit 1c52552

File tree

2 files changed

+21
-1
lines changed

2 files changed

+21
-1
lines changed

.vimrc

+4-1
Original file line numberDiff line numberDiff line change
@@ -98,6 +98,9 @@
9898
" REQUIREMENTS: See :h syntastic-intro
9999
Plug 'vim-syntastic/syntastic'
100100

101+
" YouCompleteMe completer,uncomment this or put it in ~/.vimrc.plugins
102+
" Plug 'Valloric/YouCompleteMe'
103+
101104
" Functions, class data etc.
102105
" depends on either exuberant-ctags or universal-ctags
103106
if executable('ctags-exuberant') || executable('ctags')
@@ -641,7 +644,7 @@
641644
augroup END
642645
""" }}}
643646
""" NERDTree Plugin {{{
644-
autocmd vimenter * NERDTree
647+
" autocmd vimenter * NERDTree
645648
autocmd bufenter * if (winnr("$") == 1 && exists("b:NERDTree") && b:NERDTree.isTabTree()) | q | endif
646649
""" }}}
647650
""" }}}

customized.md

+17
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
## use YouCompleteMe
2+
3+
1. 通过:PlugInstall成功之后,还需要进行编译才能使用,编译需要:cmake,python3-dev,make等包
4+
5+
对Ubuntu 16.04: sudo apt install build-essential cmake3 python3-dev
6+
7+
添加C-like语言的补全,执行:cd ~/.vim/bundle/YouCompleteMe;./install.py
8+
--clang-completer
9+
10+
默认补全: python3 install.py
11+
12+
13+
2. C-like语言的语义补全和check,需要有编译数据库
14+
15+
对于make构建工具,
16+
安装[bear](https://github.com/rizsotto/Bear),然后在项目构建目录下执行:bear
17+
make 来生成编译数据库.

0 commit comments

Comments
 (0)