-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathclang_complete.patch
More file actions
42 lines (36 loc) · 1.26 KB
/
clang_complete.patch
File metadata and controls
42 lines (36 loc) · 1.26 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
diff --git a/clang_complete/plugin/clang_complete.vim b/clang_complete/plugin/clang_complete.vim
index 54f5463..49c2805 100644
--- a/clang_complete/plugin/clang_complete.vim
+++ b/clang_complete/plugin/clang_complete.vim
@@ -7,7 +7,7 @@
" Help: Use :help clang_complete
"
-au FileType c,cpp,objc,objcpp call <SID>ClangCompleteInit()
+au FileType cpp.doxygen,c,cpp,objc,objcpp call <SID>ClangCompleteInit()
let b:clang_parameters = ''
let b:clang_user_options = ''
@@ -120,7 +120,7 @@ function! s:ClangCompleteInit()
let b:clang_parameters = '-x objective-c'
endif
- if &filetype == 'cpp' || &filetype == 'objcpp'
+ if &filetype == 'cpp' || &filetype == 'objcpp' || &filetype == 'cpp.doxygen'
let b:clang_parameters .= '++'
endif
@@ -169,8 +169,8 @@ function! s:ClangCompleteInit()
augroup end
endif
- setlocal completefunc=ClangComplete
- setlocal omnifunc=ClangComplete
+ "setlocal completefunc=ClangComplete
+ "setlocal omnifunc=ClangComplete
endfunction
function! LoadUserOptions()
@@ -382,7 +382,7 @@ endfunction
function! s:HandlePossibleSelectionEnter()
if pumvisible()
let b:snippet_chosen = 1
- return "\<C-Y>"
+ return GetFocusedAutocompleteItem() == 0 ? "\<C-N>\<C-Y>" : "\<C-Y>"
end
return "\<CR>"
endfunction