1 ! Copyright (C) 2023 Doug Coleman.
2 ! See http://factorcode.org/license.txt for BSD license.
3 USING: editors io.standard-paths kernel make math math.parser
4 namespaces sequences system ;
9 editor-class [ 10x-editor ] initialize
11 SYMBOL: 10x-editor-path
13 HOOK: find-10x-editor-path os ( -- path )
15 M: unix find-10x-editor-path "10x" ?find-in-path ;
17 M: windows find-10x-editor-path
18 { "PureDevSoftware/10x" } "10x.exe" find-in-applications
19 [ "10x.exe" ] unless* ;
21 M: 10x-editor editor-command
23 10x-editor-path get [ find-10x-editor-path ] unless* ,
25 ! python command SetCursorPos
26 [ 1 - number>string "N10X.Editor.SetCursorPos((0," "))" surround , ] bi*