textmate bundle work- stopped by modules bug
parent
7f33da63ce
commit
a211054962
|
@ -1,5 +1,5 @@
|
|||
USING: definitions io.launcher kernel math math.parser parser
|
||||
namespaces prettyprint editors make ;
|
||||
namespaces prettyprint editors make vocabs.loader ;
|
||||
IN: editors.textmate
|
||||
|
||||
: textmate ( file line -- )
|
||||
|
@ -7,3 +7,4 @@ IN: editors.textmate
|
|||
run-detached drop ;
|
||||
|
||||
[ textmate ] edit-hook set-global
|
||||
"get-using" require
|
||||
|
|
|
@ -32,4 +32,4 @@ SYNTAX: service current-vocab name>> serving-vocabs get-global adjoin ;
|
|||
register-gets-thread
|
||||
register-does-thread
|
||||
register-loads-thread
|
||||
] "start-serving-vocabs" add-init-hook
|
||||
] "modules.rpc-server" add-init-hook
|
|
@ -6,7 +6,6 @@ ARTICLE: { "modules.using" "use" } "Using the modules.using vocab"
|
|||
"Finally, the word can treat words in remote vocabularies as remote procedure calls. Any inputs are passed to the imported words as normal, and the result will appear on the stack- the only difference is that the word isn't called locally." ;
|
||||
ABOUT: { "modules.using" "use" }
|
||||
|
||||
IN: syntax
|
||||
HELP: USING*:
|
||||
{ $syntax "USING: rpc-server::module fetch-sever:module { module qualified-name } { module => word ... } { qualified-module } { module EXCEPT word ... } { module word => importname } ;" }
|
||||
{ $description "Adds vocabularies to the search path. Vocabularies can be loaded off a server or called as an rpc if preceded by a valid hostname. Bracketed pairs facilitate all types of qualified imports on both remote and local modules." }
|
||||
|
|
|
@ -12,7 +12,6 @@ remote = tokenpart s tokenpart => [[ first2 remote-load ]]
|
|||
module = rpc | remote | tokenpart
|
||||
;EBNF
|
||||
|
||||
IN: syntax
|
||||
ON-BNF: USING*:
|
||||
tokenizer = <foreign factor>
|
||||
sym = !(";"|"}"|"=>"|"EXCEPT").
|
||||
|
|
|
@ -0,0 +1,32 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
|
||||
<plist version="1.0">
|
||||
<dict>
|
||||
<key>beforeRunningCommand</key>
|
||||
<string>nop</string>
|
||||
<key>bundleUUID</key>
|
||||
<string>8061D2F3-B603-411D-AFFE-61784A07906D</string>
|
||||
<key>command</key>
|
||||
<string>#! /Applications/factor/factor
|
||||
|
||||
"TM_FILEPATH" os-env [ parent-directory ] [ file-name dup ] bi {
|
||||
{ [ dup "docs.factor" tail? ] [ drop 11 tail* "tests.factor" append append ] }
|
||||
{ [ "-tests.factor" tail? ] [ 13 tail* ".factor" append append ] }
|
||||
[ 7 tail* [ "-docs.factor" append append ] keep over exists? [ drop ] [ scaffold-help ] if ]
|
||||
} cond 0 textmate</string>
|
||||
<key>fallbackInput</key>
|
||||
<string>word</string>
|
||||
<key>input</key>
|
||||
<string>none</string>
|
||||
<key>keyEquivalent</key>
|
||||
<string>^@ </string>
|
||||
<key>name</key>
|
||||
<string>Cycle Vocabs/Docs/Tests</string>
|
||||
<key>output</key>
|
||||
<string>discard</string>
|
||||
<key>scope</key>
|
||||
<string>source.factor</string>
|
||||
<key>uuid</key>
|
||||
<string>D348BE40-6F51-4471-B300-DDDA70ED8C8C</string>
|
||||
</dict>
|
||||
</plist>
|
|
@ -0,0 +1,32 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
|
||||
<plist version="1.0">
|
||||
<dict>
|
||||
<key>beforeRunningCommand</key>
|
||||
<string>nop</string>
|
||||
<key>bundleUUID</key>
|
||||
<string>8061D2F3-B603-411D-AFFE-61784A07906D</string>
|
||||
<key>command</key>
|
||||
<string>#!/usr/bin/env ruby
|
||||
|
||||
require "#{ENV["TM_BUNDLE_SUPPORT"]}/lib/tm_factor"
|
||||
|
||||
doc = STDIN.read
|
||||
word = line_current_word(ENV["TM_CURRENT_LINE"], ENV["TM_LINE_INDEX"].to_i)
|
||||
puts factor_eval(%Q(#{doc_using_statements(doc)} USING: help.topics editors ;\n \\ #{word} >link edit))</string>
|
||||
<key>fallbackInput</key>
|
||||
<string>word</string>
|
||||
<key>input</key>
|
||||
<string>document</string>
|
||||
<key>keyEquivalent</key>
|
||||
<string>@D</string>
|
||||
<key>name</key>
|
||||
<string>Edit Word Docs</string>
|
||||
<key>output</key>
|
||||
<string>discard</string>
|
||||
<key>scope</key>
|
||||
<string>source.factor</string>
|
||||
<key>uuid</key>
|
||||
<string>D95A617C-E1C6-44DA-9126-04171CB21299</string>
|
||||
</dict>
|
||||
</plist>
|
|
@ -0,0 +1,32 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
|
||||
<plist version="1.0">
|
||||
<dict>
|
||||
<key>beforeRunningCommand</key>
|
||||
<string>nop</string>
|
||||
<key>bundleUUID</key>
|
||||
<string>8061D2F3-B603-411D-AFFE-61784A07906D</string>
|
||||
<key>command</key>
|
||||
<string>#!/usr/bin/env ruby
|
||||
|
||||
require "#{ENV["TM_BUNDLE_SUPPORT"]}/lib/tm_factor"
|
||||
|
||||
doc = STDIN.read
|
||||
word = line_current_word(ENV["TM_CURRENT_LINE"], ENV["TM_LINE_INDEX"].to_i)
|
||||
puts factor_eval(%Q(#{doc_using_statements(doc)} USE: editors\n \\ #{word} edit))</string>
|
||||
<key>fallbackInput</key>
|
||||
<string>word</string>
|
||||
<key>input</key>
|
||||
<string>document</string>
|
||||
<key>keyEquivalent</key>
|
||||
<string>@E</string>
|
||||
<key>name</key>
|
||||
<string>Edit</string>
|
||||
<key>output</key>
|
||||
<string>discard</string>
|
||||
<key>scope</key>
|
||||
<string>source.factor</string>
|
||||
<key>uuid</key>
|
||||
<string>C573487C-DD7D-497F-A728-52D7962D95E2</string>
|
||||
</dict>
|
||||
</plist>
|
|
@ -0,0 +1,29 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
|
||||
<plist version="1.0">
|
||||
<dict>
|
||||
<key>beforeRunningCommand</key>
|
||||
<string>nop</string>
|
||||
<key>bundleUUID</key>
|
||||
<string>8061D2F3-B603-411D-AFFE-61784A07906D</string>
|
||||
<key>command</key>
|
||||
<string>#!/usr/bin/env ruby
|
||||
|
||||
require "#{ENV["TM_BUNDLE_SUPPORT"]}/lib/tm_factor"
|
||||
|
||||
doc = STDIN.read
|
||||
puts factor_eval(%Q(#{doc_using_statements(doc)} USE: ui.tools.operations\n [ #{ENV["TM_SELECTED_TEXT"} ] com-expand-macros))</string>
|
||||
<key>fallbackInput</key>
|
||||
<string>word</string>
|
||||
<key>input</key>
|
||||
<string>document</string>
|
||||
<key>name</key>
|
||||
<string>Expand Selection</string>
|
||||
<key>output</key>
|
||||
<string>showAsTooltip</string>
|
||||
<key>scope</key>
|
||||
<string>source.factor</string>
|
||||
<key>uuid</key>
|
||||
<string>8465B33D-7CA0-4337-945C-4078346D64BC</string>
|
||||
</dict>
|
||||
</plist>
|
|
@ -0,0 +1,32 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
|
||||
<plist version="1.0">
|
||||
<dict>
|
||||
<key>beforeRunningCommand</key>
|
||||
<string>nop</string>
|
||||
<key>bundleUUID</key>
|
||||
<string>8061D2F3-B603-411D-AFFE-61784A07906D</string>
|
||||
<key>command</key>
|
||||
<string>#!/usr/bin/env ruby
|
||||
|
||||
require "#{ENV["TM_BUNDLE_SUPPORT"]}/lib/tm_factor"
|
||||
|
||||
doc = STDIN.read
|
||||
word = line_current_word(ENV["TM_CURRENT_LINE"], ENV["TM_LINE_INDEX"].to_i)
|
||||
puts factor_run(%Q(#{doc_using_statements(doc)} USE: editors\n \\ #{word} fix))</string>
|
||||
<key>fallbackInput</key>
|
||||
<string>word</string>
|
||||
<key>input</key>
|
||||
<string>document</string>
|
||||
<key>keyEquivalent</key>
|
||||
<string>@F</string>
|
||||
<key>name</key>
|
||||
<string>Fix</string>
|
||||
<key>output</key>
|
||||
<string>discard</string>
|
||||
<key>scope</key>
|
||||
<string>source.factor</string>
|
||||
<key>uuid</key>
|
||||
<string>D02D9D74-E073-48AE-A78E-B40FFFA519D5</string>
|
||||
</dict>
|
||||
</plist>
|
|
@ -11,7 +11,7 @@ require "#{ENV["TM_BUNDLE_SUPPORT"]}/lib/tm_factor"
|
|||
|
||||
doc = STDIN.read
|
||||
word = line_current_word(ENV["TM_CURRENT_LINE"], ENV["TM_LINE_INDEX"].to_i)
|
||||
factor_run(%Q(#{doc_using_statements(doc)} USE: ui.tools.workspace\n \\ #{word} help-window))</string>
|
||||
factor_run(%Q(#{doc_using_statements(doc)} USE: help\n \\ #{word} help))</string>
|
||||
<key>fallbackInput</key>
|
||||
<string>word</string>
|
||||
<key>input</key>
|
||||
|
|
|
@ -10,13 +10,15 @@
|
|||
require "#{ENV["TM_BUNDLE_SUPPORT"]}/lib/tm_factor"
|
||||
|
||||
doc = STDIN.read
|
||||
puts factor_eval(%Q(#{doc_using_statements(doc)} USE: inference\n [ #{ENV["TM_SELECTED_TEXT"]} ] infer.))</string>
|
||||
puts factor_eval(%Q(#{doc_using_statements(doc)} USE: stack-checker\n [ #{ENV["TM_SELECTED_TEXT"]} ] infer.))</string>
|
||||
<key>fallbackInput</key>
|
||||
<string>word</string>
|
||||
<key>input</key>
|
||||
<string>document</string>
|
||||
<key>keyEquivalent</key>
|
||||
<string>^i</string>
|
||||
<key>name</key>
|
||||
<string>Infer Effect of Selection</string>
|
||||
<string>Infer Selection</string>
|
||||
<key>output</key>
|
||||
<string>showAsTooltip</string>
|
||||
<key>scope</key>
|
|
@ -0,0 +1,27 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
|
||||
<plist version="1.0">
|
||||
<dict>
|
||||
<key>beforeRunningCommand</key>
|
||||
<string>nop</string>
|
||||
<key>command</key>
|
||||
<string>#!/usr/bin/env ruby
|
||||
|
||||
require "#{ENV["TM_BUNDLE_SUPPORT"]}/lib/tm_factor"
|
||||
|
||||
doc = STDIN.read
|
||||
puts factor_eval(%Q(#{doc_using_statements(doc)} USE: stack-checker\n [ #{ENV["TM_SELECTED_TEXT"]} ] infer.))</string>
|
||||
<key>fallbackInput</key>
|
||||
<string>word</string>
|
||||
<key>input</key>
|
||||
<string>document</string>
|
||||
<key>name</key>
|
||||
<string>Insert Inferrence</string>
|
||||
<key>output</key>
|
||||
<string>afterSelectedText</string>
|
||||
<key>scope</key>
|
||||
<string>source.factor</string>
|
||||
<key>uuid</key>
|
||||
<string>DBC0A0CA-5368-43A7-864B-7B9C4034AD08</string>
|
||||
</dict>
|
||||
</plist>
|
|
@ -0,0 +1,32 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
|
||||
<plist version="1.0">
|
||||
<dict>
|
||||
<key>beforeRunningCommand</key>
|
||||
<string>nop</string>
|
||||
<key>bundleUUID</key>
|
||||
<string>8061D2F3-B603-411D-AFFE-61784A07906D</string>
|
||||
<key>command</key>
|
||||
<string>#!/usr/bin/env ruby
|
||||
|
||||
require "#{ENV["TM_BUNDLE_SUPPORT"]}/lib/tm_factor"
|
||||
|
||||
doc = STDIN.read
|
||||
word = line_current_word(ENV["TM_CURRENT_LINE"], ENV["TM_LINE_INDEX"].to_i)
|
||||
puts factor_run(%Q(#{doc_using_statements(doc)} USE: tools.profiler\n [ #{word} ] profile))</string>
|
||||
<key>fallbackInput</key>
|
||||
<string>word</string>
|
||||
<key>input</key>
|
||||
<string>document</string>
|
||||
<key>keyEquivalent</key>
|
||||
<string>^p</string>
|
||||
<key>name</key>
|
||||
<string>Profile</string>
|
||||
<key>output</key>
|
||||
<string>discard</string>
|
||||
<key>scope</key>
|
||||
<string>source.factor</string>
|
||||
<key>uuid</key>
|
||||
<string>7FF52332-CA5B-4D46-99EF-DAE0659DB478</string>
|
||||
</dict>
|
||||
</plist>
|
|
@ -0,0 +1,26 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
|
||||
<plist version="1.0">
|
||||
<dict>
|
||||
<key>beforeRunningCommand</key>
|
||||
<string>nop</string>
|
||||
<key>command</key>
|
||||
<string>#!/usr/bin/env ruby
|
||||
|
||||
require "#{ENV["TM_BUNDLE_SUPPORT"]}/lib/tm_factor"
|
||||
doc = STDIN.read
|
||||
factor_run(%Q(USE: vocabs.loader\n "#{doc[/\bIN:\s(\S+)/, 1]}" reload))</string>
|
||||
<key>input</key>
|
||||
<string>document</string>
|
||||
<key>keyEquivalent</key>
|
||||
<string>^r</string>
|
||||
<key>name</key>
|
||||
<string>Reload</string>
|
||||
<key>output</key>
|
||||
<string>discard</string>
|
||||
<key>scope</key>
|
||||
<string>source.factor</string>
|
||||
<key>uuid</key>
|
||||
<string>8088D204-FFD7-4384-8FDD-A01536FFD0E7</string>
|
||||
</dict>
|
||||
</plist>
|
|
@ -0,0 +1,32 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
|
||||
<plist version="1.0">
|
||||
<dict>
|
||||
<key>beforeRunningCommand</key>
|
||||
<string>nop</string>
|
||||
<key>bundleUUID</key>
|
||||
<string>8061D2F3-B603-411D-AFFE-61784A07906D</string>
|
||||
<key>command</key>
|
||||
<string>#!/usr/bin/env ruby
|
||||
|
||||
require "#{ENV["TM_BUNDLE_SUPPORT"]}/lib/tm_factor"
|
||||
|
||||
doc = STDIN.read
|
||||
word = line_current_word(ENV["TM_CURRENT_LINE"], ENV["TM_LINE_INDEX"].to_i)
|
||||
puts factor_eval(%Q(#{doc_using_statements(doc)} USE: tools.annotations\n \\ #{word} reset))</string>
|
||||
<key>fallbackInput</key>
|
||||
<string>word</string>
|
||||
<key>input</key>
|
||||
<string>document</string>
|
||||
<key>keyEquivalent</key>
|
||||
<string>^~r</string>
|
||||
<key>name</key>
|
||||
<string>Reset</string>
|
||||
<key>output</key>
|
||||
<string>discard</string>
|
||||
<key>scope</key>
|
||||
<string>source.factor</string>
|
||||
<key>uuid</key>
|
||||
<string>71F08D9B-3D24-4E78-84C9-82CA736554D1</string>
|
||||
</dict>
|
||||
</plist>
|
|
@ -0,0 +1,32 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
|
||||
<plist version="1.0">
|
||||
<dict>
|
||||
<key>beforeRunningCommand</key>
|
||||
<string>nop</string>
|
||||
<key>bundleUUID</key>
|
||||
<string>8061D2F3-B603-411D-AFFE-61784A07906D</string>
|
||||
<key>command</key>
|
||||
<string>res=$(CocoaDialog inputbox --title "Scaffold Setup" \
|
||||
--informative-text "Vocab Name:" \
|
||||
--button1 "Okay" --button2 "Cancel")
|
||||
|
||||
[[ $(head -n1 <<<"$res") == "2" ]] && exit_discard
|
||||
res=$(tail -n1 <<<"$res")
|
||||
"$TM_BUNDLE_SUPPORT/lib/do_scaffolding.rb" res</string>
|
||||
<key>fallbackInput</key>
|
||||
<string>word</string>
|
||||
<key>input</key>
|
||||
<string>none</string>
|
||||
<key>keyEquivalent</key>
|
||||
<string>@N</string>
|
||||
<key>name</key>
|
||||
<string>Scaffold</string>
|
||||
<key>output</key>
|
||||
<string>discard</string>
|
||||
<key>scope</key>
|
||||
<string>source.factor</string>
|
||||
<key>uuid</key>
|
||||
<string>0CDA009F-8518-4C45-AB0E-D11B281131BF</string>
|
||||
</dict>
|
||||
</plist>
|
|
@ -11,7 +11,7 @@ require "#{ENV["TM_BUNDLE_SUPPORT"]}/lib/tm_factor"
|
|||
|
||||
doc = STDIN.read
|
||||
word = line_current_word(ENV["TM_CURRENT_LINE"], ENV["TM_LINE_INDEX"].to_i)
|
||||
puts factor_eval(%Q(#{doc_using_statements(doc)} USE: prettyprint\n \\ #{word} see))</string>
|
||||
puts factor_eval(%Q(#{doc_using_statements(doc)} USE: see\n \\ #{word} see))</string>
|
||||
<key>fallbackInput</key>
|
||||
<string>word</string>
|
||||
<key>input</key>
|
||||
|
|
|
@ -0,0 +1,32 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
|
||||
<plist version="1.0">
|
||||
<dict>
|
||||
<key>beforeRunningCommand</key>
|
||||
<string>nop</string>
|
||||
<key>bundleUUID</key>
|
||||
<string>8061D2F3-B603-411D-AFFE-61784A07906D</string>
|
||||
<key>command</key>
|
||||
<string>#!/usr/bin/env ruby
|
||||
|
||||
require "#{ENV["TM_BUNDLE_SUPPORT"]}/lib/tm_factor"
|
||||
|
||||
doc = STDIN.read
|
||||
word = line_current_word(ENV["TM_CURRENT_LINE"], ENV["TM_LINE_INDEX"].to_i)
|
||||
puts factor_eval(%Q(#{doc_using_statements(doc)} USE: tools.annotations\n \\ #{word} breakpoint))</string>
|
||||
<key>fallbackInput</key>
|
||||
<string>word</string>
|
||||
<key>input</key>
|
||||
<string>document</string>
|
||||
<key>keyEquivalent</key>
|
||||
<string>^b</string>
|
||||
<key>name</key>
|
||||
<string>Set Breakpoint</string>
|
||||
<key>output</key>
|
||||
<string>discard</string>
|
||||
<key>scope</key>
|
||||
<string>source.factor</string>
|
||||
<key>uuid</key>
|
||||
<string>E4614756-DF2E-433A-8935-197159C67AB8</string>
|
||||
</dict>
|
||||
</plist>
|
|
@ -0,0 +1,27 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
|
||||
<plist version="1.0">
|
||||
<dict>
|
||||
<key>beforeRunningCommand</key>
|
||||
<string>nop</string>
|
||||
<key>command</key>
|
||||
<string>#! /Applications/factor/factor
|
||||
USE: modules.using
|
||||
USING*: environment localhost::get-using io ;
|
||||
"TM_FILEPATH" os-env get-using write</string>
|
||||
<key>fallbackInput</key>
|
||||
<string>word</string>
|
||||
<key>input</key>
|
||||
<string>none</string>
|
||||
<key>keyEquivalent</key>
|
||||
<string>^u</string>
|
||||
<key>name</key>
|
||||
<string>Show Using</string>
|
||||
<key>output</key>
|
||||
<string>showAsTooltip</string>
|
||||
<key>scope</key>
|
||||
<string>source.factor</string>
|
||||
<key>uuid</key>
|
||||
<string>86DD4385-4029-4EFE-B546-1EC8EB5EB932</string>
|
||||
</dict>
|
||||
</plist>
|
|
@ -0,0 +1,30 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
|
||||
<plist version="1.0">
|
||||
<dict>
|
||||
<key>beforeRunningCommand</key>
|
||||
<string>nop</string>
|
||||
<key>bundleUUID</key>
|
||||
<string>8061D2F3-B603-411D-AFFE-61784A07906D</string>
|
||||
<key>command</key>
|
||||
<string>#!/usr/bin/env ruby
|
||||
|
||||
require "#{ENV["TM_BUNDLE_SUPPORT"]}/lib/tm_factor"
|
||||
|
||||
doc = STDIN.read
|
||||
word = line_current_word(ENV["TM_CURRENT_LINE"], ENV["TM_LINE_INDEX"].to_i)
|
||||
puts factor_eval(%Q(#{doc_using_statements(doc)} USE: tools.crossref\n \\ #{word} usage.))</string>
|
||||
<key>fallbackInput</key>
|
||||
<string>word</string>
|
||||
<key>input</key>
|
||||
<string>document</string>
|
||||
<key>name</key>
|
||||
<string>Usage</string>
|
||||
<key>output</key>
|
||||
<string>showAsTooltip</string>
|
||||
<key>scope</key>
|
||||
<string>source.factor</string>
|
||||
<key>uuid</key>
|
||||
<string>3043A033-A113-4283-BCBB-3DE2CCC8F63E</string>
|
||||
</dict>
|
||||
</plist>
|
|
@ -0,0 +1,29 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
|
||||
<plist version="1.0">
|
||||
<dict>
|
||||
<key>beforeRunningCommand</key>
|
||||
<string>nop</string>
|
||||
<key>bundleUUID</key>
|
||||
<string>8061D2F3-B603-411D-AFFE-61784A07906D</string>
|
||||
<key>command</key>
|
||||
<string>#!/usr/bin/env ruby
|
||||
|
||||
require "#{ENV["TM_BUNDLE_SUPPORT"]}/lib/tm_factor"
|
||||
|
||||
word = line_current_word(ENV["TM_CURRENT_LINE"], ENV["TM_LINE_INDEX"].to_i)
|
||||
puts factor_eval(%Q(USE: tools.crossref\n "#{word}" vocab-usage.))</string>
|
||||
<key>fallbackInput</key>
|
||||
<string>word</string>
|
||||
<key>input</key>
|
||||
<string>none</string>
|
||||
<key>name</key>
|
||||
<string>Vocab Usage</string>
|
||||
<key>output</key>
|
||||
<string>showAsTooltip</string>
|
||||
<key>scope</key>
|
||||
<string>source.factor</string>
|
||||
<key>uuid</key>
|
||||
<string>B1F81321-B760-474F-875D-78FB52752E1B</string>
|
||||
</dict>
|
||||
</plist>
|
|
@ -0,0 +1,29 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
|
||||
<plist version="1.0">
|
||||
<dict>
|
||||
<key>beforeRunningCommand</key>
|
||||
<string>nop</string>
|
||||
<key>bundleUUID</key>
|
||||
<string>8061D2F3-B603-411D-AFFE-61784A07906D</string>
|
||||
<key>command</key>
|
||||
<string>#!/usr/bin/env ruby
|
||||
|
||||
require "#{ENV["TM_BUNDLE_SUPPORT"]}/lib/tm_factor"
|
||||
|
||||
word = line_current_word(ENV["TM_CURRENT_LINE"], ENV["TM_LINE_INDEX"].to_i)
|
||||
puts factor_eval(%Q(USE: tools.crossref\n "#{word}" vocab-uses.))</string>
|
||||
<key>fallbackInput</key>
|
||||
<string>word</string>
|
||||
<key>input</key>
|
||||
<string>none</string>
|
||||
<key>name</key>
|
||||
<string>Vocab Uses</string>
|
||||
<key>output</key>
|
||||
<string>showAsTooltip</string>
|
||||
<key>scope</key>
|
||||
<string>source.factor</string>
|
||||
<key>uuid</key>
|
||||
<string>BC3E2E39-3B79-460C-B05E-BD00BAACB90E</string>
|
||||
</dict>
|
||||
</plist>
|
|
@ -0,0 +1,31 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
|
||||
<plist version="1.0">
|
||||
<dict>
|
||||
<key>beforeRunningCommand</key>
|
||||
<string>nop</string>
|
||||
<key>bundleUUID</key>
|
||||
<string>8061D2F3-B603-411D-AFFE-61784A07906D</string>
|
||||
<key>command</key>
|
||||
<string>#!/usr/bin/env ruby
|
||||
|
||||
require "#{ENV["TM_BUNDLE_SUPPORT"]}/lib/tm_factor"
|
||||
|
||||
doc = STDIN.read
|
||||
puts factor_run(%Q(#{doc_using_statements(doc)} USE: tools.walker\n [ #{ENV["TM_SELECTED_TEXT"]} ] walk))</string>
|
||||
<key>fallbackInput</key>
|
||||
<string>word</string>
|
||||
<key>input</key>
|
||||
<string>document</string>
|
||||
<key>keyEquivalent</key>
|
||||
<string>^w</string>
|
||||
<key>name</key>
|
||||
<string>Walk Selection</string>
|
||||
<key>output</key>
|
||||
<string>discard</string>
|
||||
<key>scope</key>
|
||||
<string>source.factor</string>
|
||||
<key>uuid</key>
|
||||
<string>57C2BAAC-0474-404F-AA91-DFD02EC2A3ED</string>
|
||||
</dict>
|
||||
</plist>
|
|
@ -0,0 +1,32 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
|
||||
<plist version="1.0">
|
||||
<dict>
|
||||
<key>beforeRunningCommand</key>
|
||||
<string>nop</string>
|
||||
<key>bundleUUID</key>
|
||||
<string>8061D2F3-B603-411D-AFFE-61784A07906D</string>
|
||||
<key>command</key>
|
||||
<string>#!/usr/bin/env ruby
|
||||
|
||||
require "#{ENV["TM_BUNDLE_SUPPORT"]}/lib/tm_factor"
|
||||
|
||||
doc = STDIN.read
|
||||
word = line_current_word(ENV["TM_CURRENT_LINE"], ENV["TM_LINE_INDEX"].to_i)
|
||||
puts factor_eval(%Q(#{doc_using_statements(doc)} USE: tools.annotations\n \\ #{word} watch))</string>
|
||||
<key>fallbackInput</key>
|
||||
<string>word</string>
|
||||
<key>input</key>
|
||||
<string>document</string>
|
||||
<key>keyEquivalent</key>
|
||||
<string>^~w</string>
|
||||
<key>name</key>
|
||||
<string>Watch</string>
|
||||
<key>output</key>
|
||||
<string>discard</string>
|
||||
<key>scope</key>
|
||||
<string>source.factor</string>
|
||||
<key>uuid</key>
|
||||
<string>1C86869F-1030-4F74-B242-6357A080E127</string>
|
||||
</dict>
|
||||
</plist>
|
|
@ -0,0 +1,239 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
|
||||
<plist version="1.0">
|
||||
<dict>
|
||||
<key>commands</key>
|
||||
<array>
|
||||
<dict>
|
||||
<key>command</key>
|
||||
<string>cut:</string>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>argument</key>
|
||||
<string>m</string>
|
||||
<key>command</key>
|
||||
<string>insertText:</string>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>argument</key>
|
||||
<string>y</string>
|
||||
<key>command</key>
|
||||
<string>insertText:</string>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>argument</key>
|
||||
<string>-</string>
|
||||
<key>command</key>
|
||||
<string>insertText:</string>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>argument</key>
|
||||
<string>w</string>
|
||||
<key>command</key>
|
||||
<string>insertText:</string>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>argument</key>
|
||||
<string>o</string>
|
||||
<key>command</key>
|
||||
<string>insertText:</string>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>argument</key>
|
||||
<string>r</string>
|
||||
<key>command</key>
|
||||
<string>insertText:</string>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>argument</key>
|
||||
<string>d</string>
|
||||
<key>command</key>
|
||||
<string>insertText:</string>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>argument</key>
|
||||
<dict>
|
||||
<key>action</key>
|
||||
<string>findPrevious</string>
|
||||
<key>findInProjectIgnoreCase</key>
|
||||
<true/>
|
||||
<key>findString</key>
|
||||
<string>: </string>
|
||||
<key>ignoreCase</key>
|
||||
<true/>
|
||||
<key>replaceAllScope</key>
|
||||
<string>document</string>
|
||||
<key>replaceString</key>
|
||||
<string>table</string>
|
||||
<key>wrapAround</key>
|
||||
<true/>
|
||||
</dict>
|
||||
<key>command</key>
|
||||
<string>findWithOptions:</string>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>command</key>
|
||||
<string>moveToBeginningOfLine:</string>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>command</key>
|
||||
<string>paste:</string>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>command</key>
|
||||
<string>moveToBeginningOfLineAndModifySelection:</string>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>argument</key>
|
||||
<dict>
|
||||
<key>beforeRunningCommand</key>
|
||||
<string>nop</string>
|
||||
<key>command</key>
|
||||
<string>#!/usr/bin/env ruby
|
||||
|
||||
require "#{ENV["TM_BUNDLE_SUPPORT"]}/lib/tm_factor"
|
||||
|
||||
doc = STDIN.read
|
||||
puts factor_eval(%Q(#{doc_using_statements(doc)} USE: stack-checker\n [ #{ENV["TM_SELECTED_TEXT"]} ] infer.))</string>
|
||||
<key>fallbackInput</key>
|
||||
<string>word</string>
|
||||
<key>input</key>
|
||||
<string>document</string>
|
||||
<key>name</key>
|
||||
<string>Insert Inferrence</string>
|
||||
<key>output</key>
|
||||
<string>afterSelectedText</string>
|
||||
<key>scope</key>
|
||||
<string>source.factor</string>
|
||||
<key>uuid</key>
|
||||
<string>DBC0A0CA-5368-43A7-864B-7B9C4034AD08</string>
|
||||
</dict>
|
||||
<key>command</key>
|
||||
<string>executeCommandWithOptions:</string>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>command</key>
|
||||
<string>insertNewline:</string>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>argument</key>
|
||||
<dict>
|
||||
<key>action</key>
|
||||
<string>findPrevious</string>
|
||||
<key>findInProjectIgnoreCase</key>
|
||||
<true/>
|
||||
<key>findString</key>
|
||||
<string>(</string>
|
||||
<key>ignoreCase</key>
|
||||
<true/>
|
||||
<key>replaceAllScope</key>
|
||||
<string>document</string>
|
||||
<key>replaceString</key>
|
||||
<string>table</string>
|
||||
<key>wrapAround</key>
|
||||
<true/>
|
||||
</dict>
|
||||
<key>command</key>
|
||||
<string>findWithOptions:</string>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>command</key>
|
||||
<string>moveToEndOfLineAndModifySelection:</string>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>command</key>
|
||||
<string>cut:</string>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>argument</key>
|
||||
<string> </string>
|
||||
<key>command</key>
|
||||
<string>insertText:</string>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>argument</key>
|
||||
<string>;</string>
|
||||
<key>command</key>
|
||||
<string>insertText:</string>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>command</key>
|
||||
<string>moveToBeginningOfLine:</string>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>argument</key>
|
||||
<string>:</string>
|
||||
<key>command</key>
|
||||
<string>insertText:</string>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>argument</key>
|
||||
<string> </string>
|
||||
<key>command</key>
|
||||
<string>insertText:</string>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>argument</key>
|
||||
<string>m</string>
|
||||
<key>command</key>
|
||||
<string>insertText:</string>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>argument</key>
|
||||
<string>y</string>
|
||||
<key>command</key>
|
||||
<string>insertText:</string>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>argument</key>
|
||||
<string>-</string>
|
||||
<key>command</key>
|
||||
<string>insertText:</string>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>argument</key>
|
||||
<string>w</string>
|
||||
<key>command</key>
|
||||
<string>insertText:</string>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>argument</key>
|
||||
<string>o</string>
|
||||
<key>command</key>
|
||||
<string>insertText:</string>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>argument</key>
|
||||
<string>r</string>
|
||||
<key>command</key>
|
||||
<string>insertText:</string>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>argument</key>
|
||||
<string>d</string>
|
||||
<key>command</key>
|
||||
<string>insertText:</string>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>argument</key>
|
||||
<string> </string>
|
||||
<key>command</key>
|
||||
<string>insertText:</string>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>command</key>
|
||||
<string>paste:</string>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>argument</key>
|
||||
<string> </string>
|
||||
<key>command</key>
|
||||
<string>insertText:</string>
|
||||
</dict>
|
||||
</array>
|
||||
<key>name</key>
|
||||
<string>Extract as New Word</string>
|
||||
<key>uuid</key>
|
||||
<string>82E740D1-8D20-48AF-8470-C85C251D4870</string>
|
||||
</dict>
|
||||
</plist>
|
|
@ -0,0 +1,16 @@
|
|||
#!/usr/bin/env ruby
|
||||
|
||||
require "#{ENV["TM_BUNDLE_SUPPORT"]}/lib/tm_factor"
|
||||
|
||||
path = ENV["TM_FILEPATH"]
|
||||
if path.include?("factor/work") then
|
||||
s = "scaffold-work"
|
||||
elsif path.include?("factor/basis") then
|
||||
s = "scaffold-basis"
|
||||
elsif path.include?("factor/core") then
|
||||
s = "scaffold-core"
|
||||
else
|
||||
s = "scaffold-extra"
|
||||
end
|
||||
|
||||
puts factor_eval(%Q(USE: tools.scaffold\n "#{ARGV.first}" #{s}))
|
|
@ -32,6 +32,10 @@ def doc_using_statements(document)
|
|||
document.scan(/\b(USING:\s[^;]*\s;|USE:\s+\S+|IN:\s\S+)/).join("\n") << "\n"
|
||||
end
|
||||
|
||||
def doc_vocab(document)
|
||||
document.sub(/\bIN:\s(\S+)/, %Q("\\1"))
|
||||
end
|
||||
|
||||
def line_current_word(line, point)
|
||||
left = line.rindex(/\s/, point - 1) || 0; right = line.index(/\s/, point) || line.length
|
||||
line[left..right]
|
||||
|
|
|
@ -2,18 +2,40 @@
|
|||
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
|
||||
<plist version="1.0">
|
||||
<dict>
|
||||
<key>deleted</key>
|
||||
<array>
|
||||
<string>4D090AD9-76F9-4A0B-B3F2-7428B7C15FBA</string>
|
||||
</array>
|
||||
<key>name</key>
|
||||
<string>Factor</string>
|
||||
<key>ordering</key>
|
||||
<array>
|
||||
<string>82E740D1-8D20-48AF-8470-C85C251D4870</string>
|
||||
<string>3C9C9C2A-314A-475B-A4E4-A68BAAF3F36E</string>
|
||||
<string>141517D7-73E0-4475-A481-71102575A175</string>
|
||||
<string>CAD3BB10-C480-4C0E-9518-94D61F7A0C0B</string>
|
||||
<string>8088D204-FFD7-4384-8FDD-A01536FFD0E7</string>
|
||||
<string>15A984BD-BC65-43E8-878A-267788C8DA70</string>
|
||||
<string>8E01DDAF-959B-4237-ADB9-C133A4ACCE90</string>
|
||||
<string>35484754-DBF9-4381-BB25-00CAB64DF4A1</string>
|
||||
<string>BC5BE120-734B-40DF-8B6B-5D3243614B27</string>
|
||||
<string>B619FCC0-2DF2-4657-82A8-0E5676A10254</string>
|
||||
<string>DBC0A0CA-5368-43A7-864B-7B9C4034AD08</string>
|
||||
<string>86DD4385-4029-4EFE-B546-1EC8EB5EB932</string>
|
||||
<string>3043A033-A113-4283-BCBB-3DE2CCC8F63E</string>
|
||||
<string>B1F81321-B760-474F-875D-78FB52752E1B</string>
|
||||
<string>BC3E2E39-3B79-460C-B05E-BD00BAACB90E</string>
|
||||
<string>8465B33D-7CA0-4337-945C-4078346D64BC</string>
|
||||
<string>57C2BAAC-0474-404F-AA91-DFD02EC2A3ED</string>
|
||||
<string>E4614756-DF2E-433A-8935-197159C67AB8</string>
|
||||
<string>1C86869F-1030-4F74-B242-6357A080E127</string>
|
||||
<string>D02D9D74-E073-48AE-A78E-B40FFFA519D5</string>
|
||||
<string>C573487C-DD7D-497F-A728-52D7962D95E2</string>
|
||||
<string>D95A617C-E1C6-44DA-9126-04171CB21299</string>
|
||||
<string>71F08D9B-3D24-4E78-84C9-82CA736554D1</string>
|
||||
<string>7FF52332-CA5B-4D46-99EF-DAE0659DB478</string>
|
||||
<string>0CDA009F-8518-4C45-AB0E-D11B281131BF</string>
|
||||
<string>D348BE40-6F51-4471-B300-DDDA70ED8C8C</string>
|
||||
</array>
|
||||
<key>uuid</key>
|
||||
<string>8061D2F3-B603-411D-AFFE-61784A07906D</string>
|
||||
|
|
Loading…
Reference in New Issue