editors: bunch of cleanup.
parent
0d7c3c5291
commit
071704072c
|
@ -1,16 +1,17 @@
|
||||||
! Copyright (C) 2014 Doug Coleman.
|
! Copyright (C) 2014 Doug Coleman.
|
||||||
! See http://factorcode.org/license.txt for BSD license.
|
! See http://factorcode.org/license.txt for BSD license.
|
||||||
USING: editors kernel make math.parser namespaces sequences ;
|
USING: editors io.standard-paths kernel make math.parser
|
||||||
|
namespaces sequences ;
|
||||||
IN: editors.atom
|
IN: editors.atom
|
||||||
|
|
||||||
SINGLETON: atom-editor
|
SINGLETON: atom-editor
|
||||||
atom-editor \ editor-class set-global
|
atom-editor editor-class set-global
|
||||||
|
|
||||||
SYMBOL: atom-path
|
SYMBOL: atom-path
|
||||||
|
|
||||||
M: atom-editor editor-command ( file line -- command )
|
M: atom-editor editor-command ( file line -- command )
|
||||||
[
|
[
|
||||||
atom-path get "atom" or ,
|
atom-path get [ "atom" ?find-in-path ] unless* ,
|
||||||
number>string ":" glue ,
|
number>string ":" glue ,
|
||||||
] { } make ;
|
] { } make ;
|
||||||
|
|
||||||
|
|
|
@ -6,7 +6,7 @@ SINGLETON: editpadlite
|
||||||
editpadlite editor-class set-global
|
editpadlite editor-class set-global
|
||||||
|
|
||||||
: editpadlite-path ( -- path )
|
: editpadlite-path ( -- path )
|
||||||
\ editpadlite-path get-global [
|
\ editpadlite-path get [
|
||||||
{
|
{
|
||||||
[ { "Just Great Software" "JGsoft" } "editpadlite.exe" find-in-applications ]
|
[ { "Just Great Software" "JGsoft" } "editpadlite.exe" find-in-applications ]
|
||||||
[ { "Just Great Software" "JGsoft" } "editpadlite7.exe" find-in-applications ]
|
[ { "Just Great Software" "JGsoft" } "editpadlite7.exe" find-in-applications ]
|
||||||
|
|
|
@ -6,7 +6,7 @@ SINGLETON: editpadpro
|
||||||
editpadpro editor-class set-global
|
editpadpro editor-class set-global
|
||||||
|
|
||||||
: editpadpro-path ( -- path )
|
: editpadpro-path ( -- path )
|
||||||
\ editpadpro-path get-global [
|
\ editpadpro-path get [
|
||||||
{
|
{
|
||||||
[ { "Just Great Software" "JGsoft" } "editpadpro.exe" find-in-applications ]
|
[ { "Just Great Software" "JGsoft" } "editpadpro.exe" find-in-applications ]
|
||||||
[ { "Just Great Software" "JGsoft" } "editpadpro7.exe" find-in-applications ]
|
[ { "Just Great Software" "JGsoft" } "editpadpro7.exe" find-in-applications ]
|
||||||
|
|
|
@ -1,14 +1,13 @@
|
||||||
USING: editors io.files io.launcher kernel math.parser
|
USING: editors io.standard-paths kernel make math.parser
|
||||||
namespaces sequences windows.shell32 make
|
namespaces ;
|
||||||
io.directories.search.windows ;
|
|
||||||
IN: editors.editplus
|
IN: editors.editplus
|
||||||
|
|
||||||
SINGLETON: editplus
|
SINGLETON: editplus
|
||||||
editplus editor-class set-global
|
editplus editor-class set-global
|
||||||
|
|
||||||
: editplus-path ( -- path )
|
: editplus-path ( -- path )
|
||||||
\ editplus-path get-global [
|
\ editplus-path get [
|
||||||
"EditPlus 2" [ "editplus.exe" tail? ] find-in-program-files
|
{ "EditPlus 2" } "editplus.exe" find-in-applications
|
||||||
[ "editplus.exe" ] unless*
|
[ "editplus.exe" ] unless*
|
||||||
] unless* ;
|
] unless* ;
|
||||||
|
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
USING: combinators.short-circuit editors kernel make
|
USING: combinators.short-circuit editors io.standard-paths
|
||||||
math.parser namespaces sequences system vocabs ;
|
kernel make math.parser namespaces sequences system ;
|
||||||
IN: editors.emacs
|
IN: editors.emacs
|
||||||
|
|
||||||
SINGLETON: emacsclient
|
SINGLETON: emacsclient
|
||||||
|
@ -7,20 +7,22 @@ emacsclient editor-class set-global
|
||||||
|
|
||||||
SYMBOL: emacsclient-path
|
SYMBOL: emacsclient-path
|
||||||
|
|
||||||
HOOK: default-emacsclient os ( -- path )
|
HOOK: find-emacsclient os ( -- path )
|
||||||
|
|
||||||
M: object default-emacsclient ( -- path ) "emacsclient" ;
|
M: object find-emacsclient ( -- path )
|
||||||
|
"emacsclient" ?find-in-path ;
|
||||||
|
|
||||||
|
M: windows find-emacsclient
|
||||||
|
{
|
||||||
|
[ { "Emacs" } "emacsclientw.exe" find-in-applications ]
|
||||||
|
[ { "Emacs" } "emacsclient.exe" find-in-applications ]
|
||||||
|
[ "emacsclient.exe" ]
|
||||||
|
} 0|| ;
|
||||||
|
|
||||||
M: emacsclient editor-command ( file line -- command )
|
M: emacsclient editor-command ( file line -- command )
|
||||||
[
|
[
|
||||||
{
|
emacsclient-path get [ find-emacsclient ] unless* ,
|
||||||
[ emacsclient-path get-global ]
|
|
||||||
[ default-emacsclient dup emacsclient-path set-global ]
|
|
||||||
} 0|| ,
|
|
||||||
"--no-wait" ,
|
"--no-wait" ,
|
||||||
number>string "+" prepend ,
|
number>string "+" prepend ,
|
||||||
,
|
,
|
||||||
] { } make ;
|
] { } make ;
|
||||||
|
|
||||||
os windows? [ "editors.emacs.windows" require ] when
|
|
||||||
|
|
||||||
|
|
|
@ -1 +0,0 @@
|
||||||
Slava Pestov
|
|
|
@ -1 +0,0 @@
|
||||||
not loaded
|
|
|
@ -1,12 +0,0 @@
|
||||||
! Copyright (C) 2009 Doug Coleman.
|
|
||||||
! See http://factorcode.org/license.txt for BSD license.
|
|
||||||
USING: editors.emacs io.directories.search.windows kernel sequences
|
|
||||||
system combinators.short-circuit ;
|
|
||||||
IN: editors.emacs.windows
|
|
||||||
|
|
||||||
M: windows default-emacsclient
|
|
||||||
{
|
|
||||||
[ "Emacs" [ "emacsclientw.exe" tail? ] find-in-program-files ]
|
|
||||||
[ "Emacs" [ "emacsclient.exe" tail? ] find-in-program-files ]
|
|
||||||
[ "emacsclient.exe" ]
|
|
||||||
} 0|| ;
|
|
|
@ -1,14 +1,13 @@
|
||||||
USING: editors io.files io.launcher kernel math.parser
|
USING: editors io.standard-paths kernel make math.parser
|
||||||
namespaces sequences windows.shell32 make
|
namespaces ;
|
||||||
io.directories.search.windows ;
|
|
||||||
IN: editors.emeditor
|
IN: editors.emeditor
|
||||||
|
|
||||||
SINGLETON: emeditor
|
SINGLETON: emeditor
|
||||||
emeditor editor-class set-global
|
emeditor editor-class set-global
|
||||||
|
|
||||||
: emeditor-path ( -- path )
|
: emeditor-path ( -- path )
|
||||||
\ emeditor-path get-global [
|
\ emeditor-path get [
|
||||||
"EmEditor" [ "EmEditor.exe" tail? ] find-in-program-files
|
{ "EmEditor" } "emeditor.exe" find-in-applications
|
||||||
[ "EmEditor.exe" ] unless*
|
[ "EmEditor.exe" ] unless*
|
||||||
] unless* ;
|
] unless* ;
|
||||||
|
|
||||||
|
|
|
@ -1,16 +1,16 @@
|
||||||
! Copyright (C) 2008 Kibleur Christophe.
|
! Copyright (C) 2008 Kibleur Christophe.
|
||||||
! See http://factorcode.org/license.txt for BSD license.
|
! See http://factorcode.org/license.txt for BSD license.
|
||||||
USING: editors io.files io.launcher kernel math.parser make
|
USING: editors io.standard-paths kernel make math.parser
|
||||||
namespaces sequences windows.shell32 io.directories.search.windows ;
|
namespaces ;
|
||||||
IN: editors.etexteditor
|
IN: editors.etexteditor
|
||||||
|
|
||||||
SINGLETON: etexteditor
|
SINGLETON: etexteditor
|
||||||
etexteditor editor-class set-global
|
etexteditor editor-class set-global
|
||||||
|
|
||||||
: etexteditor-path ( -- str )
|
: etexteditor-path ( -- str )
|
||||||
\ etexteditor-path get-global [
|
\ etexteditor-path get [
|
||||||
"e" [ "e.exe" tail? ] find-in-program-files
|
{ "e" } "e.exe" find-in-applications
|
||||||
[ "e" ] unless*
|
[ "e.exe" ] unless*
|
||||||
] unless* ;
|
] unless* ;
|
||||||
|
|
||||||
M: etexteditor editor-command ( file line -- command )
|
M: etexteditor editor-command ( file line -- command )
|
||||||
|
|
|
@ -1,22 +1,27 @@
|
||||||
! Copyright (C) 2013 Doug Coleman.
|
! Copyright (C) 2013 Doug Coleman.
|
||||||
! See http://factorcode.org/license.txt for BSD license.
|
! See http://factorcode.org/license.txt for BSD license.
|
||||||
USING: editors fry kernel make math.parser namespaces system
|
USING: combinators.short-circuit editors fry io.standard-paths
|
||||||
vocabs ;
|
kernel make math.parser namespaces system vocabs ;
|
||||||
IN: editors.geany
|
IN: editors.geany
|
||||||
|
|
||||||
SINGLETON: geany
|
SINGLETON: geany
|
||||||
geany editor-class set-global
|
geany editor-class set-global
|
||||||
|
|
||||||
HOOK: geany-path os ( -- path )
|
SYMBOL: geany-path
|
||||||
|
|
||||||
M: unix geany-path
|
HOOK: find-geany-path os ( -- path )
|
||||||
\ geany-path get-global [ "geany" ] unless* ;
|
|
||||||
|
M: unix find-geany-path "geany" ;
|
||||||
|
|
||||||
|
M: windows find-geany-path
|
||||||
|
{
|
||||||
|
[ { "Geany" } "geany.exe" find-in-applications ]
|
||||||
|
[ "Geany.exe" ]
|
||||||
|
} 0|| ;
|
||||||
|
|
||||||
M: geany editor-command
|
M: geany editor-command
|
||||||
'[
|
'[
|
||||||
geany-path ,
|
geany-path get [ find-geany-path ] unless* ,
|
||||||
_ ,
|
_ ,
|
||||||
"--line" , _ number>string ,
|
"--line" , _ number>string ,
|
||||||
] { } make ;
|
] { } make ;
|
||||||
|
|
||||||
os windows? [ "editors.geany.windows" require ] when
|
|
|
@ -1 +0,0 @@
|
||||||
Doug Coleman
|
|
|
@ -1,10 +0,0 @@
|
||||||
! Copyright (C) 2013 Doug Coleman.
|
|
||||||
! See http://factorcode.org/license.txt for BSD license.
|
|
||||||
USING: editors.geany io.directories.search.windows kernel
|
|
||||||
namespaces sequences system ;
|
|
||||||
IN: editors.geany.windows
|
|
||||||
|
|
||||||
M: windows geany-path
|
|
||||||
\ geany-path get-global [
|
|
||||||
"Geany" [ "Geany.exe" tail? ] find-in-program-files
|
|
||||||
] unless* ;
|
|
|
@ -1,15 +1,15 @@
|
||||||
! Copyright (C) 2008 Doug Coleman.
|
! Copyright (C) 2008 Doug Coleman.
|
||||||
! See http://factorcode.org/license.txt for BSD license.
|
! See http://factorcode.org/license.txt for BSD license.
|
||||||
USING: editors io.launcher kernel make math.parser namespaces
|
USING: editors io.launcher io.standard-paths kernel make
|
||||||
sequences ;
|
math.parser namespaces sequences ;
|
||||||
IN: editors.gedit
|
IN: editors.gedit
|
||||||
|
|
||||||
SINGLETON: gedit
|
SINGLETON: gedit
|
||||||
gedit editor-class set-global
|
gedit editor-class set-global
|
||||||
|
|
||||||
: gedit-path ( -- path )
|
: gedit-path ( -- path )
|
||||||
\ gedit-path get-global [
|
\ gedit-path get [
|
||||||
"gedit"
|
"gedit" ?find-in-path
|
||||||
] unless* ;
|
] unless* ;
|
||||||
|
|
||||||
M: gedit editor-command ( file line -- command )
|
M: gedit editor-command ( file line -- command )
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
USING: editors.vim io.backend kernel namespaces system
|
USING: editors.vim io.backend io.standard-paths kernel
|
||||||
vocabs editors ;
|
namespaces system vocabs editors ;
|
||||||
IN: editors.gvim
|
IN: editors.gvim
|
||||||
|
|
||||||
! This code builds on the code in editors.vim; see there for
|
! This code builds on the code in editors.vim; see there for
|
||||||
|
@ -9,10 +9,15 @@ TUPLE: gvim < vim ;
|
||||||
T{ gvim } editor-class set-global
|
T{ gvim } editor-class set-global
|
||||||
|
|
||||||
HOOK: find-gvim-path io-backend ( -- path )
|
HOOK: find-gvim-path io-backend ( -- path )
|
||||||
|
|
||||||
M: object find-gvim-path f ;
|
M: object find-gvim-path f ;
|
||||||
|
|
||||||
M: gvim find-vim-path find-gvim-path "gvim" or ;
|
M: windows find-gvim-path
|
||||||
M: gvim vim-ui? t ;
|
{ "vim" } "gvim.exe" find-in-applications ;
|
||||||
M: gvim editor-detached? t ;
|
|
||||||
|
|
||||||
os windows? [ "editors.gvim.windows" require ] when
|
M: gvim find-vim-path
|
||||||
|
find-gvim-path [ "gvim" ?find-in-path ] unless* ;
|
||||||
|
|
||||||
|
M: gvim vim-ui? t ;
|
||||||
|
|
||||||
|
M: gvim editor-detached? t ;
|
||||||
|
|
|
@ -1 +0,0 @@
|
||||||
Doug Coleman
|
|
|
@ -1 +0,0 @@
|
||||||
not loaded
|
|
|
@ -1,6 +0,0 @@
|
||||||
USING: editors.gvim io.directories.search.windows sequences
|
|
||||||
system ;
|
|
||||||
IN: editors.gvim.windows
|
|
||||||
|
|
||||||
M: windows find-gvim-path
|
|
||||||
"vim" [ "gvim.exe" tail? ] find-in-program-files ;
|
|
|
@ -12,18 +12,21 @@ ERROR: jedit-not-found ;
|
||||||
|
|
||||||
HOOK: find-jedit-path os ( -- path )
|
HOOK: find-jedit-path os ( -- path )
|
||||||
|
|
||||||
M: object find-jedit-path "jedit" ;
|
M: object find-jedit-path f ;
|
||||||
|
|
||||||
M: macosx find-jedit-path
|
M: macosx find-jedit-path
|
||||||
"org.gjt.sp.jedit" find-native-bundle
|
"org.gjt.sp.jedit" find-native-bundle [
|
||||||
dup [ "Contents/MacOS/jedit" append-path ] when ;
|
"Contents/MacOS/jedit" append-path
|
||||||
|
] [
|
||||||
|
f
|
||||||
|
] if* ;
|
||||||
|
|
||||||
M: windows find-jedit-path
|
M: windows find-jedit-path
|
||||||
{ "jedit" } "jedit.exe" find-in-applications ;
|
{ "jedit" } "jedit.exe" find-in-applications ;
|
||||||
|
|
||||||
: jedit-path ( -- path )
|
: jedit-path ( -- path )
|
||||||
\ jedit-path get-global [
|
\ jedit-path get [
|
||||||
find-jedit-path "jedit" or
|
find-jedit-path [ "jedit" ?find-in-path ] unless*
|
||||||
] unless* ;
|
] unless* ;
|
||||||
|
|
||||||
M: jedit editor-command ( file line -- command/f )
|
M: jedit editor-command ( file line -- command/f )
|
||||||
|
|
|
@ -3,7 +3,7 @@ io.pathnames io.standard-paths kernel namespaces ;
|
||||||
IN: editors.macvim
|
IN: editors.macvim
|
||||||
|
|
||||||
TUPLE: macvim < vim ;
|
TUPLE: macvim < vim ;
|
||||||
T{ macvim } \ editor-class set-global
|
T{ macvim } editor-class set-global
|
||||||
|
|
||||||
: find-macvim-bundle-path ( -- path/f )
|
: find-macvim-bundle-path ( -- path/f )
|
||||||
"org.vim.MacVim" find-native-bundle [
|
"org.vim.MacVim" find-native-bundle [
|
||||||
|
@ -11,8 +11,9 @@ T{ macvim } \ editor-class set-global
|
||||||
] [
|
] [
|
||||||
f
|
f
|
||||||
] if* ;
|
] if* ;
|
||||||
|
|
||||||
M: macvim find-vim-path find-macvim-bundle-path ;
|
M: macvim find-vim-path find-macvim-bundle-path ;
|
||||||
|
|
||||||
M: macvim vim-ui? t ;
|
M: macvim vim-ui? t ;
|
||||||
|
|
||||||
M: macvim editor-detached? t ;
|
M: macvim editor-detached? t ;
|
||||||
|
|
|
@ -1,18 +1,18 @@
|
||||||
USING: editors io.files io.launcher kernel math.parser
|
USING: editors io.standard-paths kernel make math.parser
|
||||||
namespaces sequences io.directories.search.windows make ;
|
namespaces sequences ;
|
||||||
IN: editors.notepadpp
|
IN: editors.notepad++
|
||||||
|
|
||||||
SINGLETON: notepadpp
|
SINGLETON: notepad++
|
||||||
notepadpp editor-class set-global
|
notepad++ editor-class set-global
|
||||||
|
|
||||||
: notepadpp-path ( -- path )
|
: notepad++-path ( -- path )
|
||||||
\ notepadpp-path get-global [
|
\ notepad++-path get [
|
||||||
"notepad++" [ "notepad++.exe" tail? ] find-in-program-files
|
{ "notepad++" } "notepad++.exe" find-in-applications
|
||||||
[ "notepad++.exe" ] unless*
|
[ "notepad++.exe" ] unless*
|
||||||
] unless* ;
|
] unless* ;
|
||||||
|
|
||||||
M: notepadpp editor-command ( file line -- command )
|
M: notepad++ editor-command ( file line -- command )
|
||||||
[
|
[
|
||||||
notepadpp-path ,
|
notepad++-path ,
|
||||||
number>string "-n" prepend , ,
|
number>string "-n" prepend , ,
|
||||||
] { } make ;
|
] { } make ;
|
||||||
|
|
|
@ -6,7 +6,7 @@ SINGLETON: notepad2
|
||||||
notepad2 editor-class set-global
|
notepad2 editor-class set-global
|
||||||
|
|
||||||
: notepad2-path ( -- path )
|
: notepad2-path ( -- path )
|
||||||
\ notepad2-path get-global [
|
\ notepad2-path get [
|
||||||
windows-directory "system32\\notepad.exe" append-path
|
windows-directory "system32\\notepad.exe" append-path
|
||||||
[ "notepad.exe" ] unless*
|
[ "notepad.exe" ] unless*
|
||||||
] unless* ;
|
] unless* ;
|
||||||
|
|
|
@ -1,25 +1,30 @@
|
||||||
! Copyright (C) 2007 Clemens F. Hofreither.
|
! Copyright (C) 2007 Clemens F. Hofreither.
|
||||||
! See http://factorcode.org/license.txt for BSD license.
|
! See http://factorcode.org/license.txt for BSD license.
|
||||||
! clemens.hofreither@gmx.net
|
! clemens.hofreither@gmx.net
|
||||||
USING: io.files io.launcher kernel namespaces
|
USING: editors io.standard-paths kernel make math.parser
|
||||||
math math.parser editors sequences make system unicode.case
|
namespaces sequences system ;
|
||||||
vocabs ;
|
|
||||||
IN: editors.scite
|
IN: editors.scite
|
||||||
|
|
||||||
SINGLETON: scite
|
SINGLETON: scite
|
||||||
scite editor-class set-global
|
scite editor-class set-global
|
||||||
|
|
||||||
HOOK: scite-path os ( -- path )
|
SYMBOL: scite-path
|
||||||
|
|
||||||
M: unix scite-path ( -- path )
|
HOOK: find-scite-path os ( -- path )
|
||||||
\ scite-path get-global [ "scite" ] unless* ;
|
|
||||||
|
M: unix find-scite-path "scite" ?find-in-path ;
|
||||||
|
|
||||||
|
M: windows find-scite-path
|
||||||
|
{
|
||||||
|
"Scintilla Text Editor"
|
||||||
|
"SciTE Source Code Editor"
|
||||||
|
} "scite.exe" find-in-applications
|
||||||
|
[ "scite.exe" ] unless* ;
|
||||||
|
|
||||||
M: scite editor-command ( file line -- cmd )
|
M: scite editor-command ( file line -- cmd )
|
||||||
swap
|
swap
|
||||||
[
|
[
|
||||||
scite-path ,
|
scite-path get [ find-scite-path ] unless* ,
|
||||||
,
|
,
|
||||||
number>string "-goto:" prepend ,
|
number>string "-goto:" prepend ,
|
||||||
] { } make ;
|
] { } make ;
|
||||||
|
|
||||||
os windows? [ "editors.scite.windows" require ] when
|
|
||||||
|
|
|
@ -1 +0,0 @@
|
||||||
Doug Coleman
|
|
|
@ -1 +0,0 @@
|
||||||
windows
|
|
|
@ -1,18 +0,0 @@
|
||||||
! Copyright (C) 2013 Doug Coleman.
|
|
||||||
! See http://factorcode.org/license.txt for BSD license.
|
|
||||||
USING: editors.scite io.directories.search.windows kernel
|
|
||||||
namespaces 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* ;
|
|
||||||
|
|
|
@ -9,7 +9,7 @@ sublime editor-class set-global
|
||||||
|
|
||||||
HOOK: find-sublime-path os ( -- path )
|
HOOK: find-sublime-path os ( -- path )
|
||||||
|
|
||||||
M: object find-sublime-path "sublime" ;
|
M: object find-sublime-path f ;
|
||||||
|
|
||||||
M: macosx find-sublime-path
|
M: macosx find-sublime-path
|
||||||
{ "com.sublimetext.3" "com.sublimetext.2" } [ find-native-bundle ] map-find drop [
|
{ "com.sublimetext.3" "com.sublimetext.2" } [ find-native-bundle ] map-find drop [
|
||||||
|
@ -18,11 +18,12 @@ M: macosx find-sublime-path
|
||||||
f
|
f
|
||||||
] if* ;
|
] if* ;
|
||||||
|
|
||||||
ERROR: editor-not-found editor ;
|
M: windows find-sublime-path
|
||||||
|
{ "Sublime Text 2" } "sublime_text.exe" find-in-applications ;
|
||||||
|
|
||||||
: sublime-path ( -- path )
|
: sublime-path ( -- path )
|
||||||
\ sublime-path get-global [
|
\ sublime-path get [
|
||||||
find-sublime-path [ "sublime" editor-not-found ] unless*
|
find-sublime-path [ "subl" ?find-in-path ] unless*
|
||||||
] unless* ;
|
] unless* ;
|
||||||
|
|
||||||
M: sublime editor-command ( file line -- command )
|
M: sublime editor-command ( file line -- command )
|
||||||
|
|
|
@ -1 +0,0 @@
|
||||||
windows
|
|
|
@ -1,9 +0,0 @@
|
||||||
! Copyright (C) 2013 Doug Coleman.
|
|
||||||
! See http://factorcode.org/license.txt for BSD license.
|
|
||||||
USING: editors.sublime io.directories.search.windows sequences
|
|
||||||
system ;
|
|
||||||
IN: editors.sublime.windows
|
|
||||||
|
|
||||||
M: windows find-sublime-path
|
|
||||||
"Sublime Text 2"
|
|
||||||
[ "sublime_text.exe" tail? ] find-in-program-files ;
|
|
|
@ -1,13 +1,13 @@
|
||||||
USING: editors io.files io.launcher kernel math.parser
|
USING: editors io.files io.launcher io.standard-paths kernel
|
||||||
namespaces sequences io.directories.search.windows make ;
|
math.parser namespaces sequences make ;
|
||||||
IN: editors.ted-notepad
|
IN: editors.ted-notepad
|
||||||
|
|
||||||
SINGLETON: ted-notepad
|
SINGLETON: ted-notepad
|
||||||
ted-notepad editor-class set-global
|
ted-notepad editor-class set-global
|
||||||
|
|
||||||
: ted-notepad-path ( -- path )
|
: ted-notepad-path ( -- path )
|
||||||
\ ted-notepad-path get-global [
|
\ ted-notepad-path get [
|
||||||
"TED Notepad" [ "TedNPad.exe" tail? ] find-in-program-files
|
{ "TED Notepad" } "tednpad.exe" find-in-applications
|
||||||
[ "TedNPad.exe" ] unless*
|
[ "TedNPad.exe" ] unless*
|
||||||
] unless* ;
|
] unless* ;
|
||||||
|
|
||||||
|
|
|
@ -9,8 +9,9 @@
|
||||||
!
|
!
|
||||||
! For more information about Textadept, consult http://foicica.com/textadept/
|
! For more information about Textadept, consult http://foicica.com/textadept/
|
||||||
|
|
||||||
USING: editors io.launcher io.pathnames io.standard-paths
|
USING: combinators.short-circuit editors io.launcher
|
||||||
kernel make math math.parser namespaces sequences system vocabs ;
|
io.pathnames io.standard-paths kernel make math math.parser
|
||||||
|
namespaces sequences system vocabs ;
|
||||||
IN: editors.textadept
|
IN: editors.textadept
|
||||||
|
|
||||||
SINGLETON: textadept
|
SINGLETON: textadept
|
||||||
|
@ -18,7 +19,7 @@ textadept editor-class set-global
|
||||||
|
|
||||||
HOOK: find-textadept-path os ( -- path )
|
HOOK: find-textadept-path os ( -- path )
|
||||||
|
|
||||||
M: object find-textadept-path "textadept" ;
|
M: object find-textadept-path f ;
|
||||||
|
|
||||||
M: macosx find-textadept-path
|
M: macosx find-textadept-path
|
||||||
"com.textadept" find-native-bundle [
|
"com.textadept" find-native-bundle [
|
||||||
|
@ -27,9 +28,13 @@ M: macosx find-textadept-path
|
||||||
f
|
f
|
||||||
] if* ;
|
] if* ;
|
||||||
|
|
||||||
|
M: windows find-textadept-path
|
||||||
|
{ "textadept_6.5.win32" } "textadept.exe" find-in-applications
|
||||||
|
[ "textadept.exe" ] unless* ;
|
||||||
|
|
||||||
: textadept-path ( -- path )
|
: textadept-path ( -- path )
|
||||||
\ textadept-path get-global [
|
\ textadept-path get [
|
||||||
find-textadept-path "textadept" or
|
find-textadept-path [ "textadept" ?find-in-path ] unless*
|
||||||
] unless* ;
|
] unless* ;
|
||||||
|
|
||||||
M: textadept editor-command ( file line -- command )
|
M: textadept editor-command ( file line -- command )
|
||||||
|
@ -37,5 +42,3 @@ M: textadept editor-command ( file line -- command )
|
||||||
textadept-path , "-f" , , "-e" ,
|
textadept-path , "-f" , , "-e" ,
|
||||||
1 - number>string "goto_line(" ")" surround ,
|
1 - number>string "goto_line(" ")" surround ,
|
||||||
] { } make ;
|
] { } make ;
|
||||||
|
|
||||||
os windows? [ "editors.textadept.windows" require ] when
|
|
||||||
|
|
|
@ -1 +0,0 @@
|
||||||
windows
|
|
|
@ -1,9 +0,0 @@
|
||||||
! Copyright (C) 2013 Doug Coleman.
|
|
||||||
! See http://factorcode.org/license.txt for BSD license.
|
|
||||||
USING: editors.textadept io.directories.search.windows
|
|
||||||
sequences system ;
|
|
||||||
IN: editors.textadept.windows
|
|
||||||
|
|
||||||
M: windows find-textadept-path
|
|
||||||
"textadept_6.5.win32"
|
|
||||||
[ "textadept.exe" tail? ] find-in-program-files ;
|
|
|
@ -1,6 +1,5 @@
|
||||||
USING: editors io.files io.launcher kernel math.parser
|
USING: editors io.standard-paths kernel make math.parser
|
||||||
namespaces sequences make io.directories.search
|
namespaces sequences ;
|
||||||
io.directories.search.windows ;
|
|
||||||
IN: editors.textpad
|
IN: editors.textpad
|
||||||
|
|
||||||
SINGLETON: textpad
|
SINGLETON: textpad
|
||||||
|
@ -8,11 +7,12 @@ textpad editor-class set-global
|
||||||
|
|
||||||
: textpad-path ( -- path )
|
: textpad-path ( -- path )
|
||||||
\ textpad-path get-global [
|
\ textpad-path get-global [
|
||||||
"TextPad 5" [ "TextPad.exe" tail? ] find-in-program-files
|
{ "TextPad 5" } "textpad.exe" find-in-applications
|
||||||
[ "TextPad.exe" ] unless*
|
[ "TextPad.exe" ] unless*
|
||||||
] unless* ;
|
] unless* ;
|
||||||
|
|
||||||
M: textpad editor-command ( file line -- command )
|
M: textpad editor-command ( file line -- command )
|
||||||
[
|
[
|
||||||
textpad-path , [ , ] [ number>string "(" ",0)" surround , ] bi*
|
textpad-path ,
|
||||||
|
[ , ] [ number>string "(" ",0)" surround , ] bi*
|
||||||
] { } make ;
|
] { } make ;
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
! Copyright (C) 2008 Ben Schlingelhof.
|
! Copyright (C) 2008 Ben Schlingelhof.
|
||||||
! See http://factorcode.org/license.txt for BSD license.
|
! See http://factorcode.org/license.txt for BSD license.
|
||||||
USING: editors kernel make math.parser namespaces sequences
|
USING: editors io.standard-paths kernel make math.parser
|
||||||
tools.which ;
|
namespaces sequences ;
|
||||||
IN: editors.textwrangler
|
IN: editors.textwrangler
|
||||||
|
|
||||||
! TextWrangler ships with a program called ``edit`` if you don't download
|
! TextWrangler ships with a program called ``edit`` if you don't download
|
||||||
|
@ -14,12 +14,12 @@ IN: editors.textwrangler
|
||||||
SINGLETON: textwrangler
|
SINGLETON: textwrangler
|
||||||
textwrangler editor-class set-global
|
textwrangler editor-class set-global
|
||||||
|
|
||||||
M: textwrangler editor-command ( file line -- command )
|
M: textwrangler editor-command
|
||||||
"edit" which [
|
"edit" find-in-path [
|
||||||
[ "edit +" % # " " % % ] "" make
|
[ , number>string "+" prepend , , ] { } make
|
||||||
] [
|
] [
|
||||||
[
|
[
|
||||||
"open" , "-a" , "TextWrangler" ,
|
"open" , "-a" , "TextWrangler" ,
|
||||||
[ , ] [ "--args" , number>string "+" prepend , ] bi*
|
[ , ] [ "--args" , number>string "+" prepend , ] bi*
|
||||||
] { } make
|
] { } make
|
||||||
] if ;
|
] if* ;
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
USING: editors io.files io.launcher kernel math.parser
|
USING: editors io.standard-paths kernel make math.parser
|
||||||
namespaces sequences io.directories.search.windows make ;
|
namespaces ;
|
||||||
IN: editors.ultraedit
|
IN: editors.ultraedit
|
||||||
|
|
||||||
SINGLETON: ultraedit
|
SINGLETON: ultraedit
|
||||||
|
@ -7,7 +7,7 @@ ultraedit editor-class set-global
|
||||||
|
|
||||||
: ultraedit-path ( -- path )
|
: ultraedit-path ( -- path )
|
||||||
\ ultraedit-path get-global [
|
\ ultraedit-path get-global [
|
||||||
"IDM Computer Solutions" [ "uedit32.exe" tail? ] find-in-program-files
|
{ "IDM Computer Solutions" } "uedit32.exe" find-in-applications
|
||||||
[ "uedit32.exe" ] unless*
|
[ "uedit32.exe" ] unless*
|
||||||
] unless* ;
|
] unless* ;
|
||||||
|
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
USING: editors io.backend io.launcher kernel make math.parser
|
USING: editors io.standard-paths kernel make math.parser
|
||||||
namespaces sequences strings system vocabs.loader math ;
|
namespaces sequences strings ;
|
||||||
IN: editors.vim
|
IN: editors.vim
|
||||||
|
|
||||||
TUPLE: vim ;
|
TUPLE: vim ;
|
||||||
|
@ -8,12 +8,15 @@ T{ vim } editor-class set-global
|
||||||
SYMBOL: vim-path
|
SYMBOL: vim-path
|
||||||
|
|
||||||
HOOK: find-vim-path editor-class ( -- path )
|
HOOK: find-vim-path editor-class ( -- path )
|
||||||
|
|
||||||
HOOK: vim-ui? editor-class ( -- ? )
|
HOOK: vim-ui? editor-class ( -- ? )
|
||||||
|
|
||||||
M: vim vim-ui? f ;
|
M: vim vim-ui? f ;
|
||||||
M: vim find-vim-path "vim" ;
|
|
||||||
|
M: vim find-vim-path "vim" ?find-in-path ;
|
||||||
|
|
||||||
: actual-vim-path ( -- path )
|
: actual-vim-path ( -- path )
|
||||||
\ vim-path get-global [ find-vim-path ] unless* ;
|
\ vim-path get [ find-vim-path ] unless* ;
|
||||||
|
|
||||||
M: vim editor-command ( file line -- command )
|
M: vim editor-command ( file line -- command )
|
||||||
[
|
[
|
||||||
|
|
|
@ -9,15 +9,14 @@ visual-studio-code editor-class set-global
|
||||||
HOOK: find-visual-studio-code-path os ( -- path )
|
HOOK: find-visual-studio-code-path os ( -- path )
|
||||||
|
|
||||||
MEMO: visual-studio-code-path ( -- path )
|
MEMO: visual-studio-code-path ( -- path )
|
||||||
\ visual-studio-code-path get-global [
|
\ visual-studio-code-path get [
|
||||||
find-visual-studio-code-path
|
find-visual-studio-code-path
|
||||||
[ "code" ] unless*
|
[ "code" ] unless*
|
||||||
] unless* ;
|
] unless* ;
|
||||||
|
|
||||||
M: visual-studio-code editor-command ( file line -- command )
|
M: visual-studio-code editor-command ( file line -- command )
|
||||||
[
|
[
|
||||||
visual-studio-code-path ,
|
visual-studio-code-path , drop ,
|
||||||
swap , drop
|
|
||||||
] { } make ;
|
] { } make ;
|
||||||
|
|
||||||
os windows? [ "editors.visual-studio-code.windows" require ] when
|
os windows? [ "editors.visual-studio-code.windows" require ] when
|
||||||
|
|
|
@ -6,5 +6,5 @@ system ;
|
||||||
IN: editors.visual-studio-code.windows
|
IN: editors.visual-studio-code.windows
|
||||||
|
|
||||||
M: windows find-visual-studio-code-path
|
M: windows find-visual-studio-code-path
|
||||||
get-appdata-directory 1array f
|
get-appdata-directory f
|
||||||
[ file-name >lower "code.exe" = ] find-in-directories ;
|
[ file-name >lower "code.exe" = ] find-in-directories ;
|
||||||
|
|
Loading…
Reference in New Issue