Swank Protocol and Async Events

27 views
Skip to first unread message

bradford

unread,
Sep 5, 2011, 9:40:07 AM9/5/11
to vim_use
ENSIME exists for Emacs, and it's supposedly great. I haven't seen a
Vim implementation that supports the same feature set. Why is this?

"Your editor's extension mechanism should ideally be able to open a
persistent socket connection and respond to asynchronous events on
that socket. Otherwise it may be difficult to interact with some of
the long-running calls."

Where is Vim lacking in this regard?

Ben Fritz

unread,
Sep 6, 2011, 11:51:35 PM9/6/11
to vim_use


On Sep 5, 8:40 am, bradford <fingerm...@gmail.com> wrote:
> ENSIME exists for Emacs, and it's supposedly great.  I haven't seen a
> Vim implementation that supports the same feature set.  Why is this?
>

I assume this is what you're talking about?
http://aemon.com/file_dump/ensime_manual.html#tth_sEc1.1

"ENSIME is the ENhanced Scala Interaction Mode for Emacs. It provides
many features that are commonly found only in IDEs, such as live error-
checking, symbol inspection, package/type browsing, and basic
refactorings."

Live error-checking: quickfix list?
Symbol inspection: ctags/cscope support? What does this mean?
Package/type browsing: ctags/cscope support
Basic refactorings: you're kidding. Vim probably has more plugins for
this than I could count in a day.

> "Your editor's extension mechanism should ideally be able to open a
> persistent socket connection and respond to asynchronous events on
> that socket. Otherwise it may be difficult to interact with some of
> the long-running calls."
>

Vim has its own client-server interface which can be used to
communicate with an asynchronous process. There are plugins which
allow users to use these features simply and easily (or so I
understand, I just use them directly).

That said, there have been several requests in the past to allow
asynch processes within Vim itself, to allow things like interactive
terminals within Vim. However without any idea of what you're actually
trying to accomplish we certainly cannot tell you how you might
accomplish it with existing functionality.

> Where is Vim lacking in this regard?

Are you seriously asking, or just trolling? What specifically are you
looking for?

lith

unread,
Sep 7, 2011, 4:07:11 AM9/7/11
to vim...@googlegroups.com
hi,

i guess you could use python/ruby and fork a process that listens to a connection. since fork probably isn't supported on windows, in order to provide a cross-platform solution you might have to start an app (e.g. a second intance of vim) that knows how to send commands to vim via its server/client interface.

there is nothing missing in vim. but you have to take a slightly different approach than with emacs.

hth
tom

Marc Weber

unread,
Sep 7, 2011, 8:42:23 PM9/7/11
to vim_use
You're lucky: You didn't research hard enough.
https://github.com/MarcWeber/ensime
Not sure why the ensime manual has no comment anymore.
Debugging is not supported yet but completion and background compilation
does work.

It is build on top of vim-addon-async (requiring client-server thus X on
linux)

However I hav't had time to update it to make it work with latest scala.
2.8 should be fine though.

Unfortunately I'll be unavailable for about 4 days.

Ping back on Monday if you want to help merge changes with upstream..

I consider codefellow being dead for several reasons and nobody made
eclim work with Scala yet. There is one request on their mailinglist
though.

Don't forgett that all three big ides Eclipse, IDEA, Netbeans also
support Scala to some extend and they all support at least most
important Vim keys..

Marc Weber

Jacky Liu

unread,
Sep 8, 2011, 8:28:09 AM9/8/11
to vim_use
Oh, I was trying to open an thread through Py Interface for listening
to external program but went head-on with a bug in the X system, I
haven't thought about using another process. Maybe that would work,
thanks for the idea.


Reply all
Reply to author
Forward
0 new messages