Writing NetLogo code outside the NetLogo IDE

22 views
Skip to first unread message

matt sommers

unread,
Sep 24, 2021, 10:44:32 PM9/24/21
to netlogo-users
Does anybody code NetLogo outside the IDE?

I typically use vi and EMACS for my development and would love to continue using those tools?

Cheers!

Jeremy Baker

unread,
Sep 27, 2021, 9:36:25 AM9/27/21
to matt sommers, netlogo-users
Hey Matt,

It is possible, but it's not totally seamless.  The easiest way is to use an `__includes []` directive to link to a separate code file and use that file for all your model's code instead of the "main" code area from the nlogo file.  That way you don't have to worry about NetLogo saving over your code because of a change to the interface.

The problem with this is after each change in your external editor you'll have to save and manually force a check/recompile of your code in NetLogo; it will not automatically see the change as it does when using the integrated editor.  It should work just fine, but it may take some time to get used to the workflow. 

There is at least one GitHub issue to improve this behavior, but it doesn't have a timeline for implementation:  https://github.com/NetLogo/NetLogo/issues/1267

Also, be aware of this issue with the `__reload` primitive: https://github.com/NetLogo/NetLogo/issues/1617

-Jeremy


From: netlog...@googlegroups.com <netlog...@googlegroups.com> on behalf of matt sommers <memmak...@gmail.com>
Sent: Friday, September 24, 2021 9:44 PM
To: netlogo-users <netlog...@googlegroups.com>
Subject: [netlogo-users] Writing NetLogo code outside the NetLogo IDE
 
Does anybody code NetLogo outside the IDE?

I typically use vi and EMACS for my development and would love to continue using those tools?

Cheers!

--
You received this message because you are subscribed to the Google Groups "netlogo-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to netlogo-user...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/netlogo-users/6ccc0183-9f43-4ef8-800e-bcc512b41c7an%40googlegroups.com.

Michael Tamillow

unread,
Sep 27, 2021, 10:45:33 AM9/27/21
to Jeremy Baker, matt sommers, netlogo-users
You use vi and EMACs? Simultaneously?

https://m.youtube.com/watch?v=SsoOG6ZeyUI

Sent from my iPhone

On Sep 27, 2021, at 8:36 AM, Jeremy Baker <jeremy...@northwestern.edu> wrote:


Reply all
Reply to author
Forward
0 new messages