1 ! Copyright 2013 Michael T. Richter <ttmrichter@gmail.com>
3 ! This program is free software and comes without any warranty, express nor
4 ! implied. It is, in short, warranted to do absolutely nothing but (possibly)
5 ! occupy storage space. You can redistribute it and/or modify it under the
6 ! terms of the Do What The Fuck You Want To Public License, Version 2, as
7 ! published by Sam Hocevar. Consult http://www.wtfpl.net/txt/copying for full
10 ! For more information about Textadept, consult http://foicica.com/textadept/
12 USING: combinators.short-circuit editors io.launcher
13 io.pathnames io.standard-paths kernel make math math.parser
14 namespaces sequences system vocabs ;
18 textadept editor-class set-global
20 HOOK: find-textadept-path os ( -- path )
22 M: object find-textadept-path f ;
24 M: macosx find-textadept-path
25 "com.textadept" find-native-bundle [
26 "Contents/MacOS/textadept" append-path
31 M: windows find-textadept-path
32 { "textadept_6.5.win32" } "textadept.exe" find-in-applications
33 [ "textadept.exe" ] unless* ;
35 : textadept-path ( -- path )
36 \ textadept-path get [
37 find-textadept-path [ "textadept" ?find-in-path ] unless*
40 M: textadept editor-command ( file line -- command )
42 textadept-path , "-f" , , "-e" ,
43 1 - number>string "goto_line(" ")" surround ,