Page 1 of 1

Running hoc files from sublime text 3

Posted: Thu May 28, 2020 5:05 pm
by ryang
Hi,

I was wondering if anyone had experience running hoc files in sublime text 3? I am tyring to write a build-system file so that sublime text can run and show output from the hoc file but I'm getting no output when I use the following build-system code:

Code: Select all

{
    "shell_cmd": ["nrngui", "$file"],
    "selector": "source.Neuron",
    "file_regex": "^\\s*File \"(...*?)\", line ([0-9]*)"
}

Re: Running hoc files from sublime text 3

Posted: Fri May 29, 2020 1:50 pm
by ryang
I found a solution to my own question. The shell_cmd needs to be a string argument.

Code: Select all

{
    "shell_cmd": "nrngui \"$file\"",
    "selector": "source.Neuron",
    "file_regex": "^\\s*File \"(...*?)\", line ([0-9]*)"
}
Once this works, you would need to install a package called terminus and modify the code here a little, and that will allow input to the output window. Here's a link to a video that shows how to do that. https://www.youtube.com/watch?v=etIJMVI ... e=youtu.be. One other nice thing with sublime text is that someone made syntax highlighting files for the hoc, ses, and mod files; those files are here https://github.com/jordan-g/NEURON-for-Sublime-Text (You can use these files for other IDEs of course, which I did in Coderunner for mac, but I'm trying to move away from that program do to a lack of supporting forums).