Paste: Andy's glorious .factor-rc
Author: | Andy, with much help from John B |
Mode: | factor |
Date: | Thu, 20 Jun 2024 04:28:43 |
Plain Text |
USING:
accessors arrays assocs
combinators.extras
editors
io
kernel
memory
namespaces
prettyprint.config
sequences
ui.commands ui.gadgets.editors ui.gadgets.worlds ui.gestures
ui.theme.switching ui.tools.listener.completion
vectors vocabs.loader
words ;
EDITOR: editors.sublime
2 tab-size set
dark-mode
IN: fonts
CONSTANT: default-font-size 32
"help.stylesheet" reload
IN: prettyprint
: datastack. ( seq -- )
[
"\n! " write
1array
H{
{ has-limits? t }
{ length-limit 5 }
{ line-limit 12 }
{ margin 24 }
{ pprint-string-cells? t }
{ tab-size 2 }
} [ simple-table. ] with-variables
] unless-empty ;
IN: ui.tools.listener
: update-command-map ( class group pairs -- )
pick
[ commands ]
[ of ]
[ '[ _ assoc-union ] change-commands drop ]
[ update-gestures ]
quad* ;
interactor "completion" {
{ T{ key-down f f "UP" } recall-previous }
{ T{ key-down f f "DOWN" } recall-next }
} update-command-map
editor commands "selection" of [
>vector
T{ key-down f { C+ } "l" } over delete-at
>array
] change-commands drop editor update-gestures
listener-gadget "custom" f {
{ T{ key-down f { C+ } "l" } clear-output }
} define-command-map
world "gestures" word-prop H{
{
T{ key-down { mods { C+ } } { sym "C" } }
[ \ copy-action send-action ]
}
{
T{ key-down { mods { C+ } } { sym "V" } }
[ \ paste-action send-action ]
}
{
T{ key-down { mods { C+ } } { sym "X" } }
[ \ cut-action send-action ]
}
} assoc-union! drop
IN: scratchpad
USING:
combinators.extras combinators.short-circuit.smart
math.combinatorics math.extras
sequences.extras sets splitting splitting.extras ;
IN: listener
: prompt ( -- str ) "🦖" ;
save
New Annotation