! Copyright (C) 2007 Clemens F. Hofreither.
! See http://factorcode.org/license.txt for BSD license.
! clemens.hofreither@gmx.net
-USING: io.files io.launcher kernel namespaces io.directories.search.windows
-math math.parser editors sequences make unicode.case ;
+USING: io.files io.launcher kernel namespaces
+math math.parser editors sequences make system unicode.case
+vocabs ;
IN: editors.scite
SINGLETON: scite
scite editor-class set-global
-: scite-path ( -- path )
- \ scite-path get-global [
- "Scintilla Text Editor"
- [ >lower "scite.exe" tail? ] find-in-program-files
+HOOK: scite-path os ( -- path )
- [
- "SciTE Source Code Editor"
- [ >lower "scite.exe" tail? ] find-in-program-files
- ] unless*
- [ "scite.exe" ] unless*
- ] unless* ;
+M: unix scite-path ( -- path )
+ \ scite-path get-global [ "scite" ] unless* ;
M: scite editor-command ( file line -- cmd )
swap
,
number>string "-goto:" prepend ,
] { } make ;
+
+os windows? [ "editors.scite.windows" require ] when
--- /dev/null
+! Copyright (C) 2013 Doug Coleman.
+! See http://factorcode.org/license.txt for BSD license.
+USING: io.files io.launcher kernel namespaces io.directories.search.windows
+math math.parser editors sequences system unicode.case ;
+IN: editors.scite.windows
+
+M: windows scite-path ( -- path )
+ \ scite-path get-global [
+ "Scintilla Text Editor"
+ [ >lower "scite.exe" tail? ] find-in-program-files
+
+ [
+ "SciTE Source Code Editor"
+ [ >lower "scite.exe" tail? ] find-in-program-files
+ ] unless*
+ [ "scite.exe" ] unless*
+ ] unless* ;
+