Skip to content

Instantly share code, notes, and snippets.

@koturn
Created April 10, 2016 09:07
Show Gist options
  • Save koturn/f78b468411e5fd91741d45d8b614768b to your computer and use it in GitHub Desktop.
Save koturn/f78b468411e5fd91741d45d8b614768b to your computer and use it in GitHub Desktop.
dein.vimのアレ
function! s:get_sid_prefix() abort
return matchstr(expand('<sfile>'), '^function \zs<SNR>\d\+_\zeget_sid_prefix$')
endfunction
let s:sid_prefix = s:get_sid_prefix()
delfunction s:get_sid_prefix
function! s:tes() abort
setlocal omnifunc=javacomplete#Complete
endfunction
call dein#add('artur-shaik/vim-javacomplete2')
call dein#config('artur-shaik/vim-javacomplete2', {
\ 'hook_source': 'autocmd FileType java call ' . s:sid_prefix . 'tes()'
\ })
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment