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 ;
19 editor-class [ textadept ] initialize
21 HOOK: find-textadept-path os ( -- path )
23 M: object find-textadept-path f ;
25 M: macosx find-textadept-path
26 "com.textadept" find-native-bundle [
27 "Contents/MacOS/textadept" append-path
32 M: windows find-textadept-path
33 { "textadept_6.5.win32" } "textadept.exe" find-in-applications
34 [ "textadept.exe" ] unless* ;
36 : textadept-path ( -- path )
37 \ textadept-path get [
38 find-textadept-path [ "textadept" ?find-in-path ] unless*
41 M: textadept editor-command
43 textadept-path , "-f" , , "-e" ,
44 1 - number>string "goto_line(" ")" surround ,