diff --git a/basis/editors/textmate/textmate.factor b/basis/editors/textmate/textmate.factor index 65395bd590..72af2ba030 100644 --- a/basis/editors/textmate/textmate.factor +++ b/basis/editors/textmate/textmate.factor @@ -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 diff --git a/extra/modules/rpc-server/rpc-server.factor b/extra/modules/rpc-server/rpc-server.factor index cb7e652a39..7ac50ab61f 100644 --- a/extra/modules/rpc-server/rpc-server.factor +++ b/extra/modules/rpc-server/rpc-server.factor @@ -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 \ No newline at end of file +] "modules.rpc-server" add-init-hook \ No newline at end of file diff --git a/extra/modules/using/using-docs.factor b/extra/modules/using/using-docs.factor index cfc0687944..f3c25f9201 100644 --- a/extra/modules/using/using-docs.factor +++ b/extra/modules/using/using-docs.factor @@ -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." } diff --git a/extra/modules/using/using.factor b/extra/modules/using/using.factor index 5a13f58587..5691caaf6a 100644 --- a/extra/modules/using/using.factor +++ b/extra/modules/using/using.factor @@ -12,7 +12,6 @@ remote = tokenpart s tokenpart => [[ first2 remote-load ]] module = rpc | remote | tokenpart ;EBNF -IN: syntax ON-BNF: USING*: tokenizer = sym = !(";"|"}"|"=>"|"EXCEPT"). diff --git a/misc/Factor.tmbundle/Commands/Cycle Vocabs:Docs:Tests.tmCommand b/misc/Factor.tmbundle/Commands/Cycle Vocabs:Docs:Tests.tmCommand new file mode 100644 index 0000000000..8c4ec6365d --- /dev/null +++ b/misc/Factor.tmbundle/Commands/Cycle Vocabs:Docs:Tests.tmCommand @@ -0,0 +1,32 @@ + + + + + beforeRunningCommand + nop + bundleUUID + 8061D2F3-B603-411D-AFFE-61784A07906D + command + #! /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 + fallbackInput + word + input + none + keyEquivalent + ^@ + name + Cycle Vocabs/Docs/Tests + output + discard + scope + source.factor + uuid + D348BE40-6F51-4471-B300-DDDA70ED8C8C + + diff --git a/misc/Factor.tmbundle/Commands/Edit Word Docs.tmCommand b/misc/Factor.tmbundle/Commands/Edit Word Docs.tmCommand new file mode 100644 index 0000000000..bc447eee7a --- /dev/null +++ b/misc/Factor.tmbundle/Commands/Edit Word Docs.tmCommand @@ -0,0 +1,32 @@ + + + + + beforeRunningCommand + nop + bundleUUID + 8061D2F3-B603-411D-AFFE-61784A07906D + command + #!/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)) + fallbackInput + word + input + document + keyEquivalent + @D + name + Edit Word Docs + output + discard + scope + source.factor + uuid + D95A617C-E1C6-44DA-9126-04171CB21299 + + diff --git a/misc/Factor.tmbundle/Commands/Edit.tmCommand b/misc/Factor.tmbundle/Commands/Edit.tmCommand new file mode 100644 index 0000000000..4f077c448f --- /dev/null +++ b/misc/Factor.tmbundle/Commands/Edit.tmCommand @@ -0,0 +1,32 @@ + + + + + beforeRunningCommand + nop + bundleUUID + 8061D2F3-B603-411D-AFFE-61784A07906D + command + #!/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)) + fallbackInput + word + input + document + keyEquivalent + @E + name + Edit + output + discard + scope + source.factor + uuid + C573487C-DD7D-497F-A728-52D7962D95E2 + + diff --git a/misc/Factor.tmbundle/Commands/Expand Selection.tmCommand b/misc/Factor.tmbundle/Commands/Expand Selection.tmCommand new file mode 100644 index 0000000000..d2b69dc469 --- /dev/null +++ b/misc/Factor.tmbundle/Commands/Expand Selection.tmCommand @@ -0,0 +1,29 @@ + + + + + beforeRunningCommand + nop + bundleUUID + 8061D2F3-B603-411D-AFFE-61784A07906D + command + #!/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)) + fallbackInput + word + input + document + name + Expand Selection + output + showAsTooltip + scope + source.factor + uuid + 8465B33D-7CA0-4337-945C-4078346D64BC + + diff --git a/misc/Factor.tmbundle/Commands/Fix.tmCommand b/misc/Factor.tmbundle/Commands/Fix.tmCommand new file mode 100644 index 0000000000..a49f8a49ae --- /dev/null +++ b/misc/Factor.tmbundle/Commands/Fix.tmCommand @@ -0,0 +1,32 @@ + + + + + beforeRunningCommand + nop + bundleUUID + 8061D2F3-B603-411D-AFFE-61784A07906D + command + #!/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)) + fallbackInput + word + input + document + keyEquivalent + @F + name + Fix + output + discard + scope + source.factor + uuid + D02D9D74-E073-48AE-A78E-B40FFFA519D5 + + diff --git a/misc/Factor.tmbundle/Commands/Help for Word.tmCommand b/misc/Factor.tmbundle/Commands/Help for Word.tmCommand index 0ff133c891..350c01d344 100644 --- a/misc/Factor.tmbundle/Commands/Help for Word.tmCommand +++ b/misc/Factor.tmbundle/Commands/Help for Word.tmCommand @@ -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)) +factor_run(%Q(#{doc_using_statements(doc)} USE: help\n \\ #{word} help)) fallbackInput word input diff --git a/misc/Factor.tmbundle/Commands/Infer Effect of Selection.tmCommand b/misc/Factor.tmbundle/Commands/Infer Selection.tmCommand similarity index 76% rename from misc/Factor.tmbundle/Commands/Infer Effect of Selection.tmCommand rename to misc/Factor.tmbundle/Commands/Infer Selection.tmCommand index 378294e6c1..c7b6ec8c86 100644 --- a/misc/Factor.tmbundle/Commands/Infer Effect of Selection.tmCommand +++ b/misc/Factor.tmbundle/Commands/Infer Selection.tmCommand @@ -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.)) +puts factor_eval(%Q(#{doc_using_statements(doc)} USE: stack-checker\n [ #{ENV["TM_SELECTED_TEXT"]} ] infer.)) fallbackInput word input document + keyEquivalent + ^i name - Infer Effect of Selection + Infer Selection output showAsTooltip scope diff --git a/misc/Factor.tmbundle/Commands/Insert Inferrence.tmCommand b/misc/Factor.tmbundle/Commands/Insert Inferrence.tmCommand new file mode 100644 index 0000000000..366cdfc2eb --- /dev/null +++ b/misc/Factor.tmbundle/Commands/Insert Inferrence.tmCommand @@ -0,0 +1,27 @@ + + + + + beforeRunningCommand + nop + command + #!/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.)) + fallbackInput + word + input + document + name + Insert Inferrence + output + afterSelectedText + scope + source.factor + uuid + DBC0A0CA-5368-43A7-864B-7B9C4034AD08 + + diff --git a/misc/Factor.tmbundle/Commands/Profile.tmCommand b/misc/Factor.tmbundle/Commands/Profile.tmCommand new file mode 100644 index 0000000000..108ad7b842 --- /dev/null +++ b/misc/Factor.tmbundle/Commands/Profile.tmCommand @@ -0,0 +1,32 @@ + + + + + beforeRunningCommand + nop + bundleUUID + 8061D2F3-B603-411D-AFFE-61784A07906D + command + #!/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)) + fallbackInput + word + input + document + keyEquivalent + ^p + name + Profile + output + discard + scope + source.factor + uuid + 7FF52332-CA5B-4D46-99EF-DAE0659DB478 + + diff --git a/misc/Factor.tmbundle/Commands/Reload.tmCommand b/misc/Factor.tmbundle/Commands/Reload.tmCommand new file mode 100644 index 0000000000..1dcd350ecd --- /dev/null +++ b/misc/Factor.tmbundle/Commands/Reload.tmCommand @@ -0,0 +1,26 @@ + + + + + beforeRunningCommand + nop + command + #!/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)) + input + document + keyEquivalent + ^r + name + Reload + output + discard + scope + source.factor + uuid + 8088D204-FFD7-4384-8FDD-A01536FFD0E7 + + diff --git a/misc/Factor.tmbundle/Commands/Reset.tmCommand b/misc/Factor.tmbundle/Commands/Reset.tmCommand new file mode 100644 index 0000000000..ae15b9ddd6 --- /dev/null +++ b/misc/Factor.tmbundle/Commands/Reset.tmCommand @@ -0,0 +1,32 @@ + + + + + beforeRunningCommand + nop + bundleUUID + 8061D2F3-B603-411D-AFFE-61784A07906D + command + #!/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)) + fallbackInput + word + input + document + keyEquivalent + ^~r + name + Reset + output + discard + scope + source.factor + uuid + 71F08D9B-3D24-4E78-84C9-82CA736554D1 + + diff --git a/misc/Factor.tmbundle/Commands/Scaffold.tmCommand b/misc/Factor.tmbundle/Commands/Scaffold.tmCommand new file mode 100644 index 0000000000..fe195725d7 --- /dev/null +++ b/misc/Factor.tmbundle/Commands/Scaffold.tmCommand @@ -0,0 +1,32 @@ + + + + + beforeRunningCommand + nop + bundleUUID + 8061D2F3-B603-411D-AFFE-61784A07906D + command + 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 + fallbackInput + word + input + none + keyEquivalent + @N + name + Scaffold + output + discard + scope + source.factor + uuid + 0CDA009F-8518-4C45-AB0E-D11B281131BF + + diff --git a/misc/Factor.tmbundle/Commands/See Word.tmCommand b/misc/Factor.tmbundle/Commands/See Word.tmCommand index 4502e235be..ca1cf42320 100644 --- a/misc/Factor.tmbundle/Commands/See Word.tmCommand +++ b/misc/Factor.tmbundle/Commands/See Word.tmCommand @@ -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)) +puts factor_eval(%Q(#{doc_using_statements(doc)} USE: see\n \\ #{word} see)) fallbackInput word input diff --git a/misc/Factor.tmbundle/Commands/Set Breakpoint.tmCommand b/misc/Factor.tmbundle/Commands/Set Breakpoint.tmCommand new file mode 100644 index 0000000000..1066c78eea --- /dev/null +++ b/misc/Factor.tmbundle/Commands/Set Breakpoint.tmCommand @@ -0,0 +1,32 @@ + + + + + beforeRunningCommand + nop + bundleUUID + 8061D2F3-B603-411D-AFFE-61784A07906D + command + #!/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)) + fallbackInput + word + input + document + keyEquivalent + ^b + name + Set Breakpoint + output + discard + scope + source.factor + uuid + E4614756-DF2E-433A-8935-197159C67AB8 + + diff --git a/misc/Factor.tmbundle/Commands/Show Using.tmCommand b/misc/Factor.tmbundle/Commands/Show Using.tmCommand new file mode 100644 index 0000000000..22681bd76e --- /dev/null +++ b/misc/Factor.tmbundle/Commands/Show Using.tmCommand @@ -0,0 +1,27 @@ + + + + + beforeRunningCommand + nop + command + #! /Applications/factor/factor +USE: modules.using +USING*: environment localhost::get-using io ; +"TM_FILEPATH" os-env get-using write + fallbackInput + word + input + none + keyEquivalent + ^u + name + Show Using + output + showAsTooltip + scope + source.factor + uuid + 86DD4385-4029-4EFE-B546-1EC8EB5EB932 + + diff --git a/misc/Factor.tmbundle/Commands/Usage.tmCommand b/misc/Factor.tmbundle/Commands/Usage.tmCommand new file mode 100644 index 0000000000..459a7fea66 --- /dev/null +++ b/misc/Factor.tmbundle/Commands/Usage.tmCommand @@ -0,0 +1,30 @@ + + + + + beforeRunningCommand + nop + bundleUUID + 8061D2F3-B603-411D-AFFE-61784A07906D + command + #!/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.)) + fallbackInput + word + input + document + name + Usage + output + showAsTooltip + scope + source.factor + uuid + 3043A033-A113-4283-BCBB-3DE2CCC8F63E + + diff --git a/misc/Factor.tmbundle/Commands/Vocab Usage.tmCommand b/misc/Factor.tmbundle/Commands/Vocab Usage.tmCommand new file mode 100644 index 0000000000..70687d96a2 --- /dev/null +++ b/misc/Factor.tmbundle/Commands/Vocab Usage.tmCommand @@ -0,0 +1,29 @@ + + + + + beforeRunningCommand + nop + bundleUUID + 8061D2F3-B603-411D-AFFE-61784A07906D + command + #!/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.)) + fallbackInput + word + input + none + name + Vocab Usage + output + showAsTooltip + scope + source.factor + uuid + B1F81321-B760-474F-875D-78FB52752E1B + + diff --git a/misc/Factor.tmbundle/Commands/Vocab Uses.tmCommand b/misc/Factor.tmbundle/Commands/Vocab Uses.tmCommand new file mode 100644 index 0000000000..e8acb98eb1 --- /dev/null +++ b/misc/Factor.tmbundle/Commands/Vocab Uses.tmCommand @@ -0,0 +1,29 @@ + + + + + beforeRunningCommand + nop + bundleUUID + 8061D2F3-B603-411D-AFFE-61784A07906D + command + #!/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.)) + fallbackInput + word + input + none + name + Vocab Uses + output + showAsTooltip + scope + source.factor + uuid + BC3E2E39-3B79-460C-B05E-BD00BAACB90E + + diff --git a/misc/Factor.tmbundle/Commands/Walk Selection.tmCommand b/misc/Factor.tmbundle/Commands/Walk Selection.tmCommand new file mode 100644 index 0000000000..641e6db2c6 --- /dev/null +++ b/misc/Factor.tmbundle/Commands/Walk Selection.tmCommand @@ -0,0 +1,31 @@ + + + + + beforeRunningCommand + nop + bundleUUID + 8061D2F3-B603-411D-AFFE-61784A07906D + command + #!/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)) + fallbackInput + word + input + document + keyEquivalent + ^w + name + Walk Selection + output + discard + scope + source.factor + uuid + 57C2BAAC-0474-404F-AA91-DFD02EC2A3ED + + diff --git a/misc/Factor.tmbundle/Commands/Watch.tmCommand b/misc/Factor.tmbundle/Commands/Watch.tmCommand new file mode 100644 index 0000000000..e2c95017d9 --- /dev/null +++ b/misc/Factor.tmbundle/Commands/Watch.tmCommand @@ -0,0 +1,32 @@ + + + + + beforeRunningCommand + nop + bundleUUID + 8061D2F3-B603-411D-AFFE-61784A07906D + command + #!/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)) + fallbackInput + word + input + document + keyEquivalent + ^~w + name + Watch + output + discard + scope + source.factor + uuid + 1C86869F-1030-4F74-B242-6357A080E127 + + diff --git a/misc/Factor.tmbundle/Macros/Extract as New Word.tmMacro b/misc/Factor.tmbundle/Macros/Extract as New Word.tmMacro new file mode 100644 index 0000000000..537a5aca8a --- /dev/null +++ b/misc/Factor.tmbundle/Macros/Extract as New Word.tmMacro @@ -0,0 +1,239 @@ + + + + + commands + + + command + cut: + + + argument + m + command + insertText: + + + argument + y + command + insertText: + + + argument + - + command + insertText: + + + argument + w + command + insertText: + + + argument + o + command + insertText: + + + argument + r + command + insertText: + + + argument + d + command + insertText: + + + argument + + action + findPrevious + findInProjectIgnoreCase + + findString + : + ignoreCase + + replaceAllScope + document + replaceString + table + wrapAround + + + command + findWithOptions: + + + command + moveToBeginningOfLine: + + + command + paste: + + + command + moveToBeginningOfLineAndModifySelection: + + + argument + + beforeRunningCommand + nop + command + #!/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.)) + fallbackInput + word + input + document + name + Insert Inferrence + output + afterSelectedText + scope + source.factor + uuid + DBC0A0CA-5368-43A7-864B-7B9C4034AD08 + + command + executeCommandWithOptions: + + + command + insertNewline: + + + argument + + action + findPrevious + findInProjectIgnoreCase + + findString + ( + ignoreCase + + replaceAllScope + document + replaceString + table + wrapAround + + + command + findWithOptions: + + + command + moveToEndOfLineAndModifySelection: + + + command + cut: + + + argument + + command + insertText: + + + argument + ; + command + insertText: + + + command + moveToBeginningOfLine: + + + argument + : + command + insertText: + + + argument + + command + insertText: + + + argument + m + command + insertText: + + + argument + y + command + insertText: + + + argument + - + command + insertText: + + + argument + w + command + insertText: + + + argument + o + command + insertText: + + + argument + r + command + insertText: + + + argument + d + command + insertText: + + + argument + + command + insertText: + + + command + paste: + + + argument + + command + insertText: + + + name + Extract as New Word + uuid + 82E740D1-8D20-48AF-8470-C85C251D4870 + + diff --git a/misc/Factor.tmbundle/Support/lib/do_scaffold.rb b/misc/Factor.tmbundle/Support/lib/do_scaffold.rb new file mode 100644 index 0000000000..a0cc2bf033 --- /dev/null +++ b/misc/Factor.tmbundle/Support/lib/do_scaffold.rb @@ -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})) \ No newline at end of file diff --git a/misc/Factor.tmbundle/Support/lib/tm_factor.rb b/misc/Factor.tmbundle/Support/lib/tm_factor.rb index 2775a12ae9..48f318651a 100644 --- a/misc/Factor.tmbundle/Support/lib/tm_factor.rb +++ b/misc/Factor.tmbundle/Support/lib/tm_factor.rb @@ -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] diff --git a/misc/Factor.tmbundle/info.plist b/misc/Factor.tmbundle/info.plist index 1ea756a1a5..19d58def86 100644 --- a/misc/Factor.tmbundle/info.plist +++ b/misc/Factor.tmbundle/info.plist @@ -2,18 +2,40 @@ + deleted + + 4D090AD9-76F9-4A0B-B3F2-7428B7C15FBA + name Factor ordering + 82E740D1-8D20-48AF-8470-C85C251D4870 3C9C9C2A-314A-475B-A4E4-A68BAAF3F36E 141517D7-73E0-4475-A481-71102575A175 CAD3BB10-C480-4C0E-9518-94D61F7A0C0B + 8088D204-FFD7-4384-8FDD-A01536FFD0E7 15A984BD-BC65-43E8-878A-267788C8DA70 8E01DDAF-959B-4237-ADB9-C133A4ACCE90 35484754-DBF9-4381-BB25-00CAB64DF4A1 BC5BE120-734B-40DF-8B6B-5D3243614B27 B619FCC0-2DF2-4657-82A8-0E5676A10254 + DBC0A0CA-5368-43A7-864B-7B9C4034AD08 + 86DD4385-4029-4EFE-B546-1EC8EB5EB932 + 3043A033-A113-4283-BCBB-3DE2CCC8F63E + B1F81321-B760-474F-875D-78FB52752E1B + BC3E2E39-3B79-460C-B05E-BD00BAACB90E + 8465B33D-7CA0-4337-945C-4078346D64BC + 57C2BAAC-0474-404F-AA91-DFD02EC2A3ED + E4614756-DF2E-433A-8935-197159C67AB8 + 1C86869F-1030-4F74-B242-6357A080E127 + D02D9D74-E073-48AE-A78E-B40FFFA519D5 + C573487C-DD7D-497F-A728-52D7962D95E2 + D95A617C-E1C6-44DA-9126-04171CB21299 + 71F08D9B-3D24-4E78-84C9-82CA736554D1 + 7FF52332-CA5B-4D46-99EF-DAE0659DB478 + 0CDA009F-8518-4C45-AB0E-D11B281131BF + D348BE40-6F51-4471-B300-DDDA70ED8C8C uuid 8061D2F3-B603-411D-AFFE-61784A07906D