So, of course, first time I try this again after posting, it does not
work anymore, because my fireplace.vim is "too" up-to-date. The
:Piggieback command in Vim results in a not so helpful
"IllegalArgumentException No value supplied for key:
weasel.repl.websocket.WebsocketEnv", which is due to a change in
Piggieback API. The latest fireplace would presumably work with the
latest Piggieback, but chestnut lags a bit behind.

So to get chestnut to work with Vim and the latest fireplace, one has
to change the fireplace code a bit to reflect the older Piggieback
API: at line 300 in plugin/fireplace.vim you need to change

let response = connection.eval('(cemerick.piggieback/cljs-repl'.arg.')')

to

let response = connection.eval('(cemerick.piggieback/cljs-repl
:repl-env '.arg.')')

Since this is not a very good solution if you are working with
multiple projects, some of which use an older Piggieback and some
others a newer one, a less invasive solution is to change step 4 in my
previous message to be:

:Piggieback :repl-env (weasel.repl.websocket/repl-env :ip "0.0.0.0" :port 9001)

Happy vimming!

On 18 May 2015 at 15:06, Gary Verhaegen <[email protected]> wrote:
> You can get Vim to work with Chestnut today [1] :
>
>
> Open vim
> Back in the terminal, run lein repl
> In the repl, do (run)
>
> In vim, open the cljs file and do
>
> :Piggieback (weasel.repl.websocket/repl-env :ip "0.0.0.0" :port 9001)
>
> Open browser to http://localhost:10555/
>
> In vim, cqc (js/alert "woohoo!")
>
>
> It is important to respect the order of the steps; in particular, something
> within Vim breaks if you try to evaluate anything (step 6) before connecting
> a browser (step 5).
>
> I have only tested that with Chestnut "stable", so pretty old versions of
> ClojureScript (0.0-2511) and Om (0.8.0-rc1) by now (and Clojure 1.6.0, so no
> cljc). Still feels awesome, though.
>
> [1]:
> https://m.reddit.com/r/Clojure/comments/2kojth/vimfireplace_and_chestnut_now_working/
>
> On Sunday, 17 May 2015, Tristan Strange <[email protected]> wrote:
>>
>> Hi,
>>
>> Has any progress been made with this?
>>
>> I've just tried a Chestnut and a Tenzing template and have been unable to
>> connect to a browser REPL via Vim fireplace in either environment.
>>
>> Many thanks,
>> Tristan
>>
>> On 23 February 2015 at 18:00, Alan MacDougall <[email protected]>
>> wrote:
>>>
>>> On Monday, February 23, 2015 at 8:44:06 AM UTC-6, Tristan Strange wrote:
>>>
>>> >what's the simplest means of configuring a project that allows me to
>>> > both:
>>> >
>>> > - Evaluate expressions from Vim to a browser based REPL
>>> > - Have figwheel style reloading files.
>>>
>>> I recommend using Figwheel's REPL within a screen or tmux instance, and
>>> use vim-slime to push to it.
>>>
>>> https://github.com/jpalardy/vim-slime
>>>
>>> I use this approach for anything REPL-like, from ClojureScript to Pry (a
>>> Ruby REPL) to shell scripting.
>>>
>>> --
>>> Note that posts from new members are moderated - please be patient with
>>> your first post.
>>> ---
>>> You received this message because you are subscribed to the Google Groups
>>> "ClojureScript" group.
>>> To unsubscribe from this group and stop receiving emails from it, send an
>>> email to [email protected].
>>> To post to this group, send email to [email protected].
>>> Visit this group at http://groups.google.com/group/clojurescript.
>>
>>
>> --
>> Note that posts from new members are moderated - please be patient with
>> your first post.
>> ---
>> You received this message because you are subscribed to the Google Groups
>> "ClojureScript" group.
>> To unsubscribe from this group and stop receiving emails from it, send an
>> email to [email protected].
>> To post to this group, send email to [email protected].
>> Visit this group at http://groups.google.com/group/clojurescript.

-- 
Note that posts from new members are moderated - please be patient with your 
first post.
--- 
You received this message because you are subscribed to the Google Groups 
"ClojureScript" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/clojurescript.

Reply via email to