editor-command ( file line -- command ) (original) (raw)
HOOK: editor-command editor-class ( file line -- command )
USING: editors editors.acme editors.acme.private make ;
M: acme editor-command
[ (plumb-path) , "-d" , "edit" , (massage-pathname) , ] { }
make ;
USING: editors editors.aquamacs kernel make ;
M: aquamacs editor-command [ aquamacs-path , drop , ] { } make ;
USING: editors editors.atom kernel make math.parser namespaces
sequences ;
M: atom editor-command
[
atom-path get [ find-atom ] unless* ,
number>string ":" glue ,
] { } make ;
USING: editors editors.bbedit kernel make ;
M: bbedit editor-command
drop [ "open" , "-a" , "BBEdit" , , ] { } make ;
USING: editors editors.bluefish kernel make ;
M: bluefish editor-command
drop [ "open" , "-a" , "Bluefish" , , ] { } make ;
USING: editors editors.brackets kernel make ;
M: brackets editor-command
[ brackets-path "brackets" or , drop , ] { } make ;
USING: editors editors.chime kernel make ;
M: chime editor-command
drop [ "open" , "-a" , "Chime" , , ] { } make ;
USING: editors editors.coteditor make math.parser ;
M: coteditor editor-command
[ find-cot-bundle-path , "-l" , number>string , , ] { } make
;
USING: editors editors.cudatext make math.parser sequences ;
M: cudatext editor-command
[ cudatext-path , number>string ":" glue , ] { } make ;
USING: editors editors.cursor ;
M: cursor editor-command cursor-command ;
USING: editors editors.editpadlite kernel make ;
M: editpadlite editor-command
drop [ editpadlite-path , , ] { } make ;
USING: editors editors.editpadpro make math.parser sequences ;
M: editpadpro editor-command
[ editpadpro-path , number>string "/l" prepend , , ] { }
make ;
USING: editors editors.editplus make math.parser ;
M: editplus editor-command
[ editplus-path , "-cursor" , number>string , , ] { } make ;
USING: editors editors.emacs kernel make math.parser namespaces
sequences ;
M: emacs editor-command
[
emacsclient-path get [ find-emacsclient ] unless* ,
emacsclient-args get
[ { "-a=emacs" "--no-wait" } ] unless* %
number>string "+" prepend , ,
] { } make ;
USING: editors editors.emeditor make math.parser ;
M: emeditor editor-command
[ emeditor-path , "/l" , number>string , , ] { } make ;
USING: editors editors.espresso kernel make ;
M: espresso editor-command
drop [ "open" , "-a" , "espresso" , , ] { } make ;
USING: editors editors.etexteditor kernel make math.parser ;
M: etexteditor editor-command
[
etexteditor-path ,
[ , ] [ "--line" , number>string , ] bi*
] { } make ;
USING: combinators.smart continuations editors io io.pathnames
kernel sequences ;
M: f editor-command
"Select an editor" editor-restarts throw-restarts
[ set-editor ] [
"Note:" print [
[
"To make this editor permanent, in your "
".factor-boot-rc" home-path " or " ".factor-rc"
home-path " add:\n" "USE: editors EDITOR: "
]
] dip [ append ] curry compose output>array pprint-line
] bi editor-command ;
USING: editors editors.focus ;
M: focus editor-command focus-command ;
USING: editors editors.geany kernel make math.parser namespaces
;
M: geany editor-command
[
[ [ geany-path get [ find-geany-path ] unless* , ] ] dip
[ , "--line" , ] curry compose
] dip [ number>string , ] curry compose { } make ;
USING: editors editors.gedit make math.parser sequences ;
M: gedit editor-command
[ gedit-path , number>string "+" prepend , , ] { } make ;
USING: editors editors.jedit kernel make math.parser sequences ;
M: jedit editor-command
[
find-jedit-path , "-reuseview" ,
[ , ] [ number>string "+line:" prepend , ] bi*
] { } make ;
USING: editors editors.kakoune kernel make math.parser sequences
strings ;
M: kakoune editor-command
[
actual-kak-path dup string? [ , ] [ % ] if
number>string "+" prepend , ,
] { } make ;
USING: editors editors.kate kernel make ;
M: kate editor-command [ kate-path , drop , ] { } make ;
USING: editors editors.lapce kernel make ;
M: lapce editor-command [ lapce-path , drop , ] { } make ;
USING: combinators.short-circuit editors editors.lite-xl
io.pathnames kernel make namespaces strings ;
M: lite-xl editor-command
[
lite-xl-editor-path get
[ find-lite-xl-editor-path ] unless* dup
{ [ string? ] [ pathname? ] } 1|| [ , ] [ % ] if
[ , ] [ drop ] bi*
] { } make ;
USING: editors editors.notepad++ make math.parser sequences ;
M: notepad++ editor-command
[ notepad++-path , number>string "-n" prepend , , ] { } make
;
USING: editors editors.notepadnext kernel make ;
M: notepadnext editor-command
[ [ [ , ] ] dip [ , ] curry compose ] dip [ [ "-n" , ] ] dip
[ , ] curry compose [ when ] curry
[ [ [ find-notepadnext-path ] ] dip ] dip [ bi* ] 2curry
compose { } make ;
USING: editors editors.nova kernel make math.parser sequences ;
M: nova editor-command
swap [
nova-path , "open" , , "--line" ,
number>string ":1" append ,
] { } make ;
USING: editors editors.pulsar kernel make math.parser namespaces
sequences ;
M: pulsar editor-command
[
pulsar-path get [ find-pulsar ] unless* ,
number>string ":" glue ,
] { } make ;
USING: editors editors.rider make math.parser ;
M: rider editor-command
[ find-rider-path , "--line" , number>string , , ] { } make
;
USING: editors editors.scite kernel make math.parser namespaces
sequences ;
M: scite editor-command
swap [
scite-path get [ find-scite-path ] unless* , ,
number>string "-goto:" prepend ,
] { } make ;
USING: editors editors.smultron kernel make ;
M: smultron editor-command
drop [ "open" , "-a" , "Smultron" , , ] { } make ;
USING: editors editors.subethaedit kernel make ;
M: subethaedit editor-command
drop [ "open" , "-a" , "SubEthaEdit" , , ] { } make ;
USING: editors editors.sublime make math.parser sequences ;
M: sublime editor-command
[ sublime-path , "-a" , number>string ":" glue , ] { } make
;
USING: editors editors.ted-notepad make math.parser sequences ;
M: ted-notepad editor-command
[ ted-notepad-path , number>string "/l" prepend , , ] { }
make ;
USING: editors editors.textadept kernel make math math.parser
sequences ;
M: textadept editor-command
swap [
textadept-path , "-f" , , "-e" , 1 -
number>string "goto_line(" ")" surround ,
] { } make ;
USING: editors editors.textedit kernel make ;
M: textedit editor-command
drop [ "open" , "-a" , "TextEdit" , , ] { } make ;
USING: editors editors.textmate make math.parser ;
M: textmate editor-command
[ "mate" , "-a" , "-l" , number>string , , ] { } make ;
USING: editors editors.textpad kernel make math.parser sequences
;
M: textpad editor-command
[
textpad-path ,
[ , ] [ number>string "(" ",0)" surround , ] bi*
] { } make ;
USING: editors editors.textwrangler io.standard-paths kernel
make math.parser sequences ;
M: textwrangler editor-command
"edit" find-in-path
[ [ , number>string "+" prepend , , ] { } make ] [
[
"open" , "-a" , "TextWrangler" ,
[ , ] [ "--args" , number>string "+" prepend , ] bi*
] { } make
] if* ;
USING: editors editors.ultraedit kernel make math.parser system
;
M: ultraedit editor-command
[
ultraedit-path , os windows?
[ [ swap % "/" % # "/1" % ] "" make ] [ drop ] if ,
] { } make ;
USING: editors editors.vim kernel make math.parser namespaces
sequences strings ;
M: vim-base editor-command
[
actual-vim-path dup string? [ , ] [ % ] if vim-ui?
[ "-g" , ] when vim-tabs? get
[ "--remote-tab-silent" , ] when
number>string "+" prepend , ,
] { } make ;
USING: editors editors.visual-studio-code ;
M: visual-studio-code-base editor-command
visual-studio-code-editor-command ;
USING: editors editors.xcode kernel make ;
M: xcode editor-command
drop [ "open" , "-a" , "XCode" , , ] { } make ;
USING: editors editors.zed make math.parser sequences ;
M: zed editor-command
[ zed-path , number>string ":" glue , ] { } make ;