IN: editors.acme
SINGLETON: acme
-acme editor-class set-global
+
+editor-class [ acme ] initialize
: plan9-path ( -- path )
\ plan9-path get [
+++ /dev/null
-not loaded
IN: editors.atom
SINGLETON: atom
-atom editor-class set-global
+
+editor-class [ atom ] initialize
SYMBOL: atom-path
+++ /dev/null
-not loaded
IN: editors.bbedit
SINGLETON: bbedit
-bbedit editor-class set-global
+
+editor-class [ bbedit ] initialize
M: bbedit editor-command
drop
IN: editors.brackets
SINGLETON: brackets
-brackets editor-class set-global
+
+editor-class [ brackets ] initialize
HOOK: brackets-path os ( -- path )
IN: editors.coteditor
SINGLETON: coteditor
-coteditor editor-class set-global
+
+editor-class [ coteditor ] initialize
: find-cot-bundle-path ( -- path/f )
"com.coteditor.CotEditor" find-native-bundle [
+++ /dev/null
-not loaded
IN: editors.editpadlite
SINGLETON: editpadlite
-editpadlite editor-class set-global
+
+editor-class [ editpadlite ] initialize
: editpadlite-path ( -- path )
\ editpadlite-path get [
+++ /dev/null
-not loaded
IN: editors.editpadpro
SINGLETON: editpadpro
-editpadpro editor-class set-global
+
+editor-class [ editpadpro ] initialize
: editpadpro-path ( -- path )
\ editpadpro-path get [
+++ /dev/null
-not loaded
IN: editors.editplus
SINGLETON: editplus
-editplus editor-class set-global
+
+editor-class [ editplus ] initialize
: editplus-path ( -- path )
\ editplus-path get [
+++ /dev/null
-not loaded
IN: editors.emacs
SINGLETON: emacs
-emacs editor-class set-global
+
+editor-class [ emacs ] initialize
SYMBOL: emacsclient-path
SYMBOL: emacsclient-args
+++ /dev/null
-not loaded
IN: editors.emeditor
SINGLETON: emeditor
-emeditor editor-class set-global
+
+editor-class [ emeditor ] initialize
: emeditor-path ( -- path )
\ emeditor-path get [
+++ /dev/null
-not loaded
IN: editors.etexteditor
SINGLETON: etexteditor
-etexteditor editor-class set-global
+
+editor-class [ etexteditor ] initialize
: etexteditor-path ( -- str )
\ etexteditor-path get [
+++ /dev/null
-not loaded
IN: editors.geany
SINGLETON: geany
-geany editor-class set-global
+
+editor-class [ geany ] initialize
SYMBOL: geany-path
IN: editors.gedit
SINGLETON: gedit
-gedit editor-class set-global
+
+editor-class [ gedit ] initialize
: gedit-path ( -- path )
\ gedit-path get [
+++ /dev/null
-not loaded
! more information.
TUPLE: gvim < vim ;
-T{ gvim } editor-class set-global
+
+editor-class [ T{ gvim } ] initialize
HOOK: find-gvim-path io-backend ( -- path )
+++ /dev/null
-not loaded
IN: editors.jedit
SINGLETON: jedit
-jedit editor-class set-global
+
+editor-class [ jedit ] initialize
HOOK: find-jedit-path os ( -- path )
+++ /dev/null
-not loaded
IN: editors.macvim
TUPLE: macvim < vim ;
-T{ macvim } editor-class set-global
+
+editor-class [ T{ macvim } ] initialize
: find-macvim-bundle-path ( -- path/f )
"org.vim.MacVim" find-native-bundle [
+++ /dev/null
-not loaded
IN: editors.notepad++
SINGLETON: notepad++
-notepad++ editor-class set-global
+
+editor-class [ notepad++ ] initialize
: notepad++-path ( -- path )
\ notepad++-path get [
+++ /dev/null
-not loaded
IN: editors.notepad
SINGLETON: notepad
-notepad editor-class set-global
+
+editor-class [ notepad ] initialize
: notepad-path ( -- path )
\ notepad-path get [
+++ /dev/null
-not loaded
IN: editors.notepad2
SINGLETON: notepad2
-notepad2 editor-class set-global
+
+editor-class [ notepad2 ] initialize
: notepad2-path ( -- path )
\ notepad2-path get [
+++ /dev/null
-not loaded
IN: editors.nova
SINGLETON: nova
-nova editor-class set-global
+
+editor-class [ nova ] initialize
M: nova editor-command
drop
IN: editors.scite
SINGLETON: scite
-scite editor-class set-global
+
+editor-class [ scite ] initialize
SYMBOL: scite-path
+++ /dev/null
-not loaded
IN: editors.smultron
SINGLETON: smultron
-smultron editor-class set-global
+
+editor-class [ smultron ] initialize
M: smultron editor-command
drop
IN: editors.subethaedit
SINGLETON: subethaedit
-subethaedit editor-class set-global
+
+editor-class [ subethaedit ] initialize
M: subethaedit editor-command
drop
+++ /dev/null
-not loaded
IN: editors.sublime
SINGLETON: sublime
-sublime editor-class set-global
+
+editor-class [ sublime ] initialize
HOOK: find-sublime-path os ( -- path )
+++ /dev/null
-not loaded
IN: editors.ted-notepad
SINGLETON: ted-notepad
-ted-notepad editor-class set-global
+
+editor-class [ ted-notepad ] initialize
: ted-notepad-path ( -- path )
\ ted-notepad-path get [
+++ /dev/null
-not loaded
IN: editors.textadept
SINGLETON: textadept
-textadept editor-class set-global
+
+editor-class [ textadept ] initialize
HOOK: find-textadept-path os ( -- path )
+++ /dev/null
-not loaded
IN: editors.textedit
SINGLETON: textedit
-textedit editor-class set-global
+
+editor-class [ textedit ] initialize
M: textedit editor-command
drop
+++ /dev/null
-not loaded
IN: editors.textmate
SINGLETON: textmate
-textmate editor-class set-global
+
+editor-class [ textmate ] initialize
M: textmate editor-command
[ "mate" , "-a" , "-l" , number>string , , ] { } make ;
+++ /dev/null
-not loaded
IN: editors.textpad
SINGLETON: textpad
-textpad editor-class set-global
+
+editor-class [ textpad ] initialize
: textpad-path ( -- path )
\ textpad-path get-global [
+++ /dev/null
-not loaded
! Note that launching with ``open -a`` does not support line numbers.
SINGLETON: textwrangler
-textwrangler editor-class set-global
+
+editor-class [ textwrangler ] initialize
M: textwrangler editor-command
"edit" find-in-path [
! Copyright (C) 2018 Doug Coleman.
! See http://factorcode.org/license.txt for BSD license.
-USING: accessors editors kernel sequences ui ui.gadgets
-ui.gadgets.borders ui.gadgets.buttons ui.gadgets.packs
-ui.gadgets.scrollers ui.tools.listener vocabs.loader ;
+USING: accessors editors kernel namespaces sequences ui
+ui.gadgets ui.gadgets.borders ui.gadgets.buttons
+ui.gadgets.packs ui.gadgets.scrollers ui.tools.listener
+vocabs.loader ;
IN: editors.ui
: <reload-editor-button> ( editor -- button )
- dup '[ drop [ _ reload ] \ run call-listener ] <border-button> ;
+ dup '[
+ drop
+ [ f editor-class set-global _ reload ]
+ \ run call-listener
+ ] <border-button> ;
: <editor-reloader> ( -- gadget )
<filled-pile> { 2 2 } >>gap available-editors
+++ /dev/null
-not loaded
IN: editors.ultraedit
SINGLETON: ultraedit
-ultraedit editor-class set-global
+
+editor-class [ ultraedit ] initialize
HOOK: find-ultraedit os ( -- path )
+++ /dev/null
-not loaded
IN: editors.vim
TUPLE: vim ;
-T{ vim } editor-class set-global
+
+editor-class [ T{ vim } ] initialize
SYMBOL: vim-path
TUPLE: visual-studio-code-exploration < visual-studio-code ;
-T{ visual-studio-code-exploration } editor-class set-global
+editor-class [ T{ visual-studio-code-exploration } ] initialize
M: visual-studio-code-exploration find-visual-studio-code-path
os {
TUPLE: visual-studio-code-insiders < visual-studio-code ;
-T{ visual-studio-code-insiders } editor-class set-global
+editor-class [ T{ visual-studio-code-insiders } ] initialize
M: visual-studio-code-insiders find-visual-studio-code-path
os {
! https://code.visualstudio.com/docs/editor/command-line
TUPLE: visual-studio-code ;
-T{ visual-studio-code } editor-class set-global
+
+editor-class [ T{ visual-studio-code } ] initialize
HOOK: find-visual-studio-code-path editor-class ( -- path )
TUPLE: visual-studio-codium < visual-studio-code ;
-T{ visual-studio-codium } editor-class set-global
+editor-class [ T{ visual-studio-codium } ] initialize
M: visual-studio-codium find-visual-studio-code-path
os {
+++ /dev/null
-not loaded
IN: editors.wordpad
SINGLETON: wordpad
-wordpad editor-class set-global
+
+editor-class [ wordpad ] initialize
: wordpad-path ( -- path )
\ wordpad-path get [
IN: editors.xcode
SINGLETON: xcode
-xcode editor-class set-global
+
+editor-class [ xcode ] initialize
M: xcode editor-command
drop