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