Commits

Yuki KODAMA committed 8c9688f

vim: enhancement for eclim

Comments (0)

Files changed (3)

 let g:neocomplcache_enable_auto_select = 1
 let g:neocomplcache_min_keyword_length = 3
 let g:neocomplcache_min_syntax_length = 3
-let g:neocomplcache_plugin_completion_length_list = {
+let g:neocomplcache_plugin_completion_length = {
   \ 'buffer_complete'    : 1,
+  \ 'eclim_complete'     : 1,
   \ 'snippets_complete'  : 2,
   \ 'keyword_complete'   : 2,
   \ 'include_complete'   : 3,

vimfiles/autoload/neocomplcache/sources/eclim_complete.vim

+let s:save_cpo = &cpo
+set cpo&vim
+
+let s:source = {
+      \ 'name' : 'eclim_complete',
+      \ 'kind' : 'complfunc',
+      \}
+
+function! s:source.initialize()"{{{
+endfunction"}}}
+
+function! s:source.finalize()"{{{
+endfunction"}}}
+
+function! neocomplcache#sources#eclim_complete#define()"{{{
+  return s:source
+endfunction"}}}
+
+function! s:source.get_keyword_pos(cur_text)"{{{
+  return eclim#java#complete#CodeComplete(1, '')
+endfunction"}}}
+
+function! s:source.get_complete_words(cur_keyword_pos, cur_keyword_str)"{{{
+  return eclim#java#complete#CodeComplete(0, a:cur_keyword_str)
+endfunction"}}}
+
+let &cpo = s:save_cpo
+unlet s:save_cpo
+
+" vim: foldmethod=marker

vimfiles/eclim/ftplugin/java/eclim.vim

 
 " Options {{{
 
-setlocal completefunc=eclim#java#complete#CodeComplete
+"setlocal completefunc=eclim#java#complete#CodeComplete
 
 if g:EclimJavaSetCommonOptions
   " allow cpp keywords in java files (delete, friend, union, template, etc).
Tip: Filter by directory path e.g. /media app.js to search for public/media/app.js.
Tip: Use camelCasing e.g. ProjME to search for ProjectModifiedEvent.java.
Tip: Filter by extension type e.g. /repo .js to search for all .js files in the /repo directory.
Tip: Separate your search with spaces e.g. /ssh pom.xml to search for src/ssh/pom.xml.
Tip: Use ↑ and ↓ arrow keys to navigate and return to view the file.
Tip: You can also navigate files with Ctrl+j (next) and Ctrl+k (previous) and view the file with Ctrl+o.
Tip: You can also navigate files with Alt+j (next) and Alt+k (previous) and view the file with Alt+o.