Development Enviroments for Windows

Post Reply
Karl
Posts: 5
Joined: Thu Apr 17, 2008 3:42 pm
Location: University of Alberta

Development Enviroments for Windows

Post by Karl » Thu Apr 17, 2008 3:59 pm

I spend a significant part of my day picking through .hoc files trying to find out which typo is stopping my simulations this time. I'm wondering if anyone has a found good development environment that works for windows.

I had been using Geany for some time using C# highlighting. Is there something better?

Raj
Posts: 219
Joined: Thu Jun 09, 2005 1:09 pm
Location: Hanze University of Applied Sciences
Contact:

Post by Raj » Thu Apr 24, 2008 5:41 am

This topic introduces several editors

https://www.neuron.yale.edu/phpBB2/viewtopic.php?t=148

for windows to my knowledge PSPad is still the best freesoftware for working with NEURON's hoc-code. The hoc syntax highlighting comes automatically with the latest versions of the program. The syntax highlighting of mod-code is still imperfect because it can't deal with the colon comment style.

Eric Thomson
Posts: 15
Joined: Thu Mar 02, 2006 11:18 am
Contact:

Re: Development Enviroments for Windows

Post by Eric Thomson » Fri Jun 27, 2008 11:32 pm

I like PSPad, but for one feature: when I type a left parenthesis, it automatically inserts a right-paren. That means I have to click the right arrow key to move past it before I hit return. I'd rather just type the parens myself and hit return.

Does anyone know how to get rid of this trait in PSPad? I am using PSPad 4.5.3, with the NEURON.INI file for highlighter definitions.

Added in Edit:
I got rid of the parentheses autocompletion feature by going to
Settings-->Program Settings-->Editor (part 1)
and unselect 'Completion of chars ({[<"'

dsdill02

Re: Development Enviroments for Windows

Post by dsdill02 » Thu Apr 29, 2010 3:02 pm

I use Jedit with hoc highlighting. Here is the information:

Hoc editing: jEdit Editor with Neuron highlighting
1. download jEdit (http://www.jedit.org/index.php?page=download)
2. download neuron.xml for jEdit (http://community.jedit.org/?q=filestore ... 1&from=60P)
3. copy neuron.xml into jEdit directory C:\Program Files\jEdit\modes and add the file information to the catalog file (named catalog with no extension) in the same directory

<MODE NAME="neuron" FILE="neuron.xml"
FILE_NAME_GLOB="*.hoc" />


4. In jEdit, go to Utilities, Options, Editing and verify it contains the mode to neuron
5. When you open a hoc file it will be highlighted/colored for syntax

bsuter
Posts: 41
Joined: Fri May 28, 2010 9:04 am

Re: Development Enviroments for Windows

Post by bsuter » Wed Nov 03, 2010 1:13 am

I've recently started using TextPad on Windows as an editor for hoc, ses, and mode files; there is a free trial version. This editor has tabs for multiple open documents, and also allows side-by-side or top-and-bottom panes for viewing two files simultaneously. There is a built-in file comparison function and a filesystem tree browser. Syntax highlighting is accomplished using syntax definition files from a default set, from published add-ons, or from user-created files. Here are two syntax definition files that I've made - one for hoc/ses files, the other for mod files. No guarantees as to completeness or accuracy, but they seem to work for me. To use these, use the Configure->New Document Class wizard and associate each of these files with the appropriate file name extensions. The Configure->Preferences menu will further allow you to add the neuron.exe executable as an "external tool" - when invoked with a keystroke combo, e.g. CTRL-1, this will launch neuron and pass the currently open filename as an argument - a convenient way to launch your simulation from the editor.

neuron-hoc.syn

Code: Select all

; TextPad syntax definitions for NEURON HOC (and SES) files
; Copyright (C) 2010, Ben Suter
; adapted starting from TextPad's built-in c.syn file

C=1

[Syntax]
Namespace1 = 6
IgnoreCase = No
KeyWordLength =
BracketChars = {[()]}
;OperatorChars = -+*/<>!~%^&|=
OperatorChars = -+*/<>!~%^&|.=
PreprocStart = #
SyntaxStart =
SyntaxEnd =
HexPrefix = 0x
CommentStart = /*
CommentEnd = */
CommentStartAlt =
CommentEndAlt =
SingleComment = //
SingleCommentCol =
SingleCommentAlt =
SingleCommentColAlt =
SingleCommentEsc =
StringsSpanLines = Yes
StringStart = "
StringEnd = "
StringAlt =
StringEsc = \
CharStart = '
CharEnd = '
CharEsc = \

[Preprocessor keywords]
#define
#elif
#else
#endif
#error
#if
#ifdef
#ifndef
#include
#pragma
#undef
defined

[Keywords 1]
; control
return
break
continue
stop
if
else
while
for
iterator_statement

; general declaration
proc
func
iterator
double
depvar
eqn
local
strdef

; miscellaneous
print
delete
read
debug
em
parallel
help

; object oriented
begintemplate
endtemplate
objectvar objref (synonyms)
public
external
new


[Keywords 2]
; neuron specific
create
connect
setpointer
access
insert
uninsert
forall
ifsec
forsec

; built-in constants
PI
E
GAMMA
DEG
PHI
FARADAY
R

; built-in functions
sin
cos
atan
log
log10
exp
sqrt
int
abs
erf
erfc
system
prmat
solve
wqinit
plt
axis
plot
plotx
ploty
regraph
symbols
printf
xred
sred
ropen
wopen
xopen
fprint
fscan
graph
graphmode
fmenu
lw
getstr
strcmp
setcolor
startsw
stopsw
object_id
allobjectvars
allobjexts
xpanel
xbutton
xcheckbox
xstatebutton
xlabel
xmenu
xvalue
xpvalue
xradiobutton
xfixedvalue
xvarlabel
xslider
boolean_dialog
continue_dialog
string_dialog
doEvents
doNotify
numarg
hoc_pointer_
execute execute1
load_proc
load_func
load_template
machine_name
saveaudit
retrieveaudit
coredump_on_error
checkpoint
quit
object_push
object_pop
pwman_place
show_errmess_always
numprocs
myproc
psync
settext
secname

; variables
float_epsilon
hoc_ac_


[Keywords 3]
; variables (introduced by nrnoc)
t
dt
clamp_resist
celsius
secondorder
diam_changed

; functions (introduced by nrnoc)
node_data
disconnect
batch_run
batch_save
pt3dclear
pt3dadd
n3d
x3d
y3d
z3d
diam3d
arc3d
define_shape
p3dconst
spine3d setSpineArea
getSpineArea
area
ri
initnrn
topology
fadvance
distance
finitialize
fstim
fstimi
ion_style
nernst
ghk

; mechanisms with range variables
hh
pas

; classes
SectionRef
SectionList
VClamp
SVClamp
IClamp
AlphaSynapse
APCount
neuron-mod.syn

Code: Select all

; TextPad syntax definitions for NEURON MOD files
; Copyright (C) 2010, Ben Suter
; adapted starting from TextPad's built-in c.syn file

C=1

[Syntax]
Namespace1 = 6
IgnoreCase = No
KeyWordLength =
BracketChars = {[()]}
OperatorChars = -+*/<>!~%^&|=
PreprocStart = #
SyntaxStart =
SyntaxEnd =
HexPrefix = 0x
CommentStart = COMMENT
CommentEnd = ENDCOMMENT
CommentStartAlt = VERBATIM
CommentEndAlt = ENDVERBATIM
SingleComment = :
SingleCommentCol =
SingleCommentAlt =
SingleCommentColAlt =
SingleCommentEsc =
StringsSpanLines = Yes
StringStart = "
StringEnd = "
StringAlt =
StringEsc = \
CharStart = '
CharEnd = '
CharEsc = \

[Preprocessor keywords]
#define
#elif
#else
#endif
#error
#if
#ifdef
#ifndef
#include
#pragma
#undef
defined

[Keywords 1]
TITLE
UNITS
PARAMETER
KTOMV
NEURON
SUFFIX
USEION
READ
WRITE
RANGE
GLOBAL
STATE
ASSIGNED
INITIAL
BREAKPOINT
SOLVE
METHOD
DERIVATIVE
FUNCTION
LOCAL
PROCEDURE
NONSPECIFIC_CURRENT
KINETIC
POINT_PROCESS
UNITSOFF
UNITSON
LINEAR
NONLINEAR
NET_RECEIVE
FUNCTION_TABLE
CONSERVE
STEADYSTATE
FROM
TO
COMPARTMENT
LONGITUDINAL_DIFFUSION

celsius
t
v
diam
area
dt

cnexp
derivimplicit
sparse

at_time

; control
if
else


[Keywords 2]
; built-in constants
PI
E
GAMMA
DEG
PHI
FARADAY
R

; built-in functions
sin
cos
atan
log
log10
exp
sqrt
int
abs
erf
erfc

Post Reply