medit/moo/mooedit/context.cfg

32 lines
654 B
INI

[tool]
id = SwitchHeaderAndImplementation
name = Switch Header and Implementation
langs = C, GAP
type = moo-script
options = need-file
extensions = [[['.h', '.hh', '.hpp', '.hxx', '.H'], ['.c', '.cc', '.cpp', '.cxx', '.C']],
[['.gd'], ['.gi']]];
new = none;
for p in extensions do
if doc.ext in p[0] then
new = p[1];
break;
elif doc.ext in p[1] then
new = p[0];
break;
fi;
od;
if not new then
return;
fi;
for e in new do
file = doc.dir + '/' + doc.base + e;
if FileExists(file) then
Open(file);
return;
fi;
od;