I just started using eclim, and this is very useful.
Unfortunately, there's some issues and caveats. The most annoying
thing i found is that vim saves current file every time i call
autocompletion <C-X><C-U> .
I have made a patch to workaround with it.
What the patch does:
There's a new variable g:EclimJavaCompleteTmpFile (default: 0)
By default behavior is the same as without this patch.
But if user let g:EclimJavaCompleteTmpFile = 1 , then at every
autocomplete Eclim will save temporary file instead of a real file,
and eclipse will work with temp file. After this, Vim deletes this
temp file.
If gvim is running embedded, then Vim also will do :ProjectRefresh,
because of this temp file appears in project tree while Eclipse does
autocompletion.
Here's a patch: http://goo.gl/D3iD5
--
There is just one little issue: when Eclim does autocompletion in
embedded gvim, in the Eclipse's project tree appears temp filename for
a little time (~ 0.5 sec at my machine). But, for me, this is very
little issue, compared to undesirable file save. REALLY!
---
P.S. I think i found a little bug (misprint) while i've been looking
how to find out is gvim embedded or not:
in the file "eclim/plugin/project.vim", line 60:
if g:EclimProjectRefreshFiles || has('netbeans_intg')
you should check 'netbeans_enabled' instead of 'netbeans_intg'. Please
read :help feature-list :
netbeans_intg Compiled with support for |netbeans|.
netbeans_enabled Compiled with support for |netbeans| and connected.
Overall the patch looks good and I plan to apply it, but I just
haven't had the time to give it a thorough testing.
I'm also thinking of expanding it to:
- perhaps make it a part of eclim#java#util#SilentUpdate so that other
java features that have to write the file can benefit from this.
- pushing eclim#java#util#SilentUpdate into eclim#lang so the other
languages support can make use of this as well.
- make the cleanup block a part of the server side via either a new
command line option or just detecting temp files based on name
(probably the latter).
> --
>
> There is just one little issue: when Eclim does autocompletion in
> embedded gvim, in the Eclipse's project tree appears temp filename for
> a little time (~ 0.5 sec at my machine). But, for me, this is very
> little issue, compared to undesirable file save. REALLY!
Did you try prefixing the file with a '.' to see if that prevents it
from showing up in the project tree? I was thinking of trying that and
if that doesn't work perhaps looking into project filter settings.
> ---
>
> P.S. I think i found a little bug (misprint) while i've been looking
> how to find out is gvim embedded or not:
> in the file "eclim/plugin/project.vim", line 60:
>
> if g:EclimProjectRefreshFiles || has('netbeans_intg')
>
> you should check 'netbeans_enabled' instead of 'netbeans_intg'. Please
> read :help feature-list :
>
> netbeans_intg Compiled with support for |netbeans|.
> netbeans_enabled Compiled with support for |netbeans| and connected.
Thanks for spotting that. I've fixed that as well as one other
occurrence that should have been 'netbeans_enabled'.
--
eric
19.12.2011 19:18 пользователь "Eric Van Dewoestine" <erva...@gmail.com> написал:
Yes, I tried to prefix file with a dot, but Eclipse don't work with dotfiles, unfortunately. About project filter settings: I don't know about it (I'm new in Eclipse), so maybe it will do the trick. Anyway, project tree refreshes fast, so it does not annoy me :)
Thanks for your answer and for agreement to apply my patches! I'm happy to participate in developing of such useful project.
Have a nice day.
Dmitry.
> > ---
> >
> > P.S. I think i found a little bug (misprint) while i've been looking
> > how to find out is gvim embedded or not:
> > in the file "eclim/plugin/project.vim", line 60:
> >
> > if g:EclimProjectRefreshFiles || has('netbeans_intg')
> >
> > you should check 'netbeans_enabled' instead of 'netbeans_intg'. Please
> > read :help feature-list :
> >
> > netbeans_intg Compiled with support for |netbeans|.
> > netbeans_enabled Compiled with support for |netbeans| and connected.
>
> Thanks for spotting that. I've fixed that as well as one other
> occurrence that should have been 'netbeans_enabled'.
>
> --
> eric
>
> --
> You received this message because you are subscribed to the Google Groups "eclim-dev" group.
> To post to this group, send email to ecli...@googlegroups.com.
> To unsubscribe from this group, send email to eclim-dev+...@googlegroups.com.
> For more options, visit this group at http://groups.google.com/group/eclim-dev?hl=en.
>
FYI, I finally committed[1] a version of this patch.
Thanks again for submitting this :)
[1] https://github.com/ervandew/eclim/commit/10799b684a99602115b362d2a6812027b3db54a8
--
eric
--
eric