More tools

master
Yevgen Muntyan 2006-11-30 15:49:24 -06:00
parent dbd71a73b1
commit ab742534ca
2 changed files with 140 additions and 29 deletions

View File

@ -1,31 +1,43 @@
# -%- strip: false -%-
[tool] [tool]
id = SwitchHeaderAndImplementation id = SwitchHeaderAndImplementation
name = Switch Header and Implementation name = Switch Header and Implementation
langs = C, GAP langs = c, cpp, gap
type = moo-script type = moo-script
options = need-file options = need-file
extensions = [[['.h', '.hh', '.hpp', '.hxx', '.H'], ['.c', '.cc', '.cpp', '.cxx', '.C']], extensions = [[['.h', '.hh', '.hpp', '.hxx', '.H'], ['.c', '.cc', '.cpp', '.cxx', '.C']],
[['.gd'], ['.gi']]]; [['.gd'], ['.gi']]];
new = none; new = none;
for p in extensions do for p in extensions do
if doc.ext in p[0] then if doc.ext in p[0] then
new = p[1]; new = p[1];
break; break;
elif doc.ext in p[1] then elif doc.ext in p[1] then
new = p[0]; new = p[0];
break; break;
fi; fi;
od; od;
if not new then if not new then
return;
fi;
for e in new do
file = doc.dir + '/' + doc.base + e;
if FileExists(file) then
Open(file);
return; return;
fi; fi;
od;
for e in new do [tool]
file = doc.dir + '/' + doc.base + e; id=DVI_Forward_Search
if FileExists(file) then langs=latex
Open(file); type=exe
return; name=DVI Forward Search
fi; options=need-file
od; output=async
kdvi --unique file:$DOC_BASE.dvi#src:$LINE$DOC &&
dcop `dcopfind -a 'kviewshell-*'` kdvi-mainwindow#1 hide &&
dcop `dcopfind -a 'kviewshell-*'` kdvi-mainwindow#1 show

View File

@ -1,19 +1,118 @@
# -%- strip: false -%-
[tool] [tool]
id = ShellCommand id = ShellCommand
name = _Shell Command name = _Shell Command
os = unix os = unix
type = moo-script type = moo-script
options = need-doc options = need-doc
cmd = HistoryEntry("", "ShellCommand"); cmd = HistoryEntry("", "ShellCommand");
if cmd then if cmd then
Insert(Exec(cmd), "\n"); Insert(Exec(cmd), "\n");
fi; fi;
[tool] [tool]
id = SortLines id = SortLines
name = Sort name = Sort Lines
type = exe type = exe
options = need-doc options = need-doc
input = lines input = lines
output = insert output = insert
sort sort
[tool]
id=Yacc
langs=yacc
type=exe
name=Bison
filter=bison
options=need-save
output=pane
bison $DOC
[tool]
id=LaTeX
langs=latex
type=exe
name=LaTeX
filter=latex
options=need-save
output=pane
accel=<shift><ctrl>L
latex --src-specials $DOC
[tool]
id=Make_PDF
langs=latex
type=exe
name=Make PDF
filter=latex
options=need-save
output=pane
latex --src-specials $DOC &&
dvips $DOC_BASE.dvi &&
ps2pdf $DOC_BASE.ps
[tool]
id=Bibtex
langs=latex
type=exe
name=Bibtex
options=need-doc
output=pane
accel=<shift><ctrl>B
bibtex $DOC_BASE
[tool]
id=PdfLaTeX
langs=latex
type=exe
name=PdfLaTeX
filter=latex
options=need-save
output=pane
pdflatex $DOC
[tool]
id=View_DVI
langs=latex
type=exe
name=View DVI
options=need-doc
output=async
accel=<shift><ctrl>V
kdvi --unique $DOC_BASE.dvi &&
dcop `dcopfind -a 'kviewshell-*'` kdvi-mainwindow#1 hide &&
dcop `dcopfind -a 'kviewshell-*'` kdvi-mainwindow#1 show
[tool]
id=View_PDF
langs=latex
type=exe
name=View PDF
options=need-doc
output=async
kpdf=`dcopfind -a 'kpdf-*'`
if [ -z "$kpdf"]; then
kpdf $DOC_BASE.pdf
kpdf=`dcopfind -a 'kpdf-*'`
else
dcop "$kpdf" kpdf openDocument "$DOC_DIR/$DOC_BASE.pdf"
fi
dcop "$kpdf" kpdf-mainwindow#1 hide
dcop "$kpdf" kpdf-mainwindow#1 show
[tool]
id=Math
langs=latex
type=moo-script
name=Math
options=need-doc
accel=<alt>M
selection = Selection();
if selection then
Insert('$' + selection + '$');
else
Insert('$ $');
Left();
Select(-1);
fi;