]> gitweb.factorcode.org Git - factor.git/blob - basis/editors/scite/scite.factor
aa5c5ef2a1e2f7fd5798dca1e975b057ca527280
[factor.git] / basis / editors / scite / scite.factor
1 ! Basic SciTE integration for Factor.
2 !
3 ! By Clemens F. Hofreither, 2007.
4 ! clemens.hofreither@gmx.net
5 !
6 ! In your .factor-rc or .factor-boot-rc,
7 ! require this module and set the scite-path
8 ! variable to point to your executable,
9 ! if not on the path.
10 !
11 USING: io.files io.launcher kernel namespaces math
12 math.parser editors sequences windows.shell32 make ;
13 IN: editors.scite
14
15 : scite-path ( -- path )
16     \ scite-path get-global [
17         program-files "wscite\\SciTE.exe" append-path
18     ] unless* ;
19
20 : scite-command ( file line -- cmd )
21   swap
22   [
23     scite-path ,
24     ,
25     "-goto:" swap number>string append ,
26   ] { } make ;
27
28 : scite-location ( file line -- )
29   scite-command run-detached drop ;
30
31 [ scite-location ] edit-hook set-global