Skip to content

Instantly share code, notes, and snippets.

@twmht
Created May 11, 2012 15:32
Show Gist options
  • Save twmht/2660477 to your computer and use it in GitHub Desktop.
Save twmht/2660477 to your computer and use it in GitHub Desktop.
auto switch between autocomplop and neocomplopcache in eclim
" In function! eclim#ExecuteEclim
....
let g:eclimd_running=1
""" Because the snippet may execute multiple times, I just make the auto-switch between these two plugins execute only one time
if !exists('g:mht_enableThePlugin')
"""all the eclimrc settings will store in eclimrc.vim, not vimrc for management-easy reason
source ~/eclimrc.vim
let g:mht_enableThePlugin = 1
endif
AcpEnable
NeoComplCacheDisable
"""acp for eclim
let g:acp_behaviorJavaEclimLength = 0
function MeetsForJavaEclim(context)
return g:acp_behaviorJavaEclimLength >= 0 &&
\ a:context =~ '\k\.\k\{' . g:acp_behaviorJavaEclimLength . ',}$'
endfunction
let g:acp_behavior = {
\ 'java': [{
\ 'command': "\<c-x>\<c-u>",
\ 'completefunc' : 'eclim#java#complete#CodeComplete',
\ 'meets' : 'MeetsForJavaEclim',
\ }]
\ }
nnoremap <leader>i :JavaImport<cr>
let g:EclimProjectTreeAutoOpen=1
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment