From fec2e3b7aed34616e1622a18578498e7afd55a53 Mon Sep 17 00:00:00 2001 From: John Benediktsson Date: Fri, 5 Aug 2022 16:12:03 -0700 Subject: [PATCH] editors.cudatext: support for CudaText editor. --- basis/editors/cudatext/authors.txt | 1 + basis/editors/cudatext/cudatext.factor | 30 ++++++++++++++++++++++++++ basis/editors/cudatext/summary.txt | 1 + 3 files changed, 32 insertions(+) create mode 100644 basis/editors/cudatext/authors.txt create mode 100644 basis/editors/cudatext/cudatext.factor create mode 100644 basis/editors/cudatext/summary.txt diff --git a/basis/editors/cudatext/authors.txt b/basis/editors/cudatext/authors.txt new file mode 100644 index 0000000000..e091bb8164 --- /dev/null +++ b/basis/editors/cudatext/authors.txt @@ -0,0 +1 @@ +John Benediktsson diff --git a/basis/editors/cudatext/cudatext.factor b/basis/editors/cudatext/cudatext.factor new file mode 100644 index 0000000000..88d1dc8d9b --- /dev/null +++ b/basis/editors/cudatext/cudatext.factor @@ -0,0 +1,30 @@ +USING: editors io.pathnames io.standard-paths kernel make +math.parser namespaces sequences system ; +USING: editors ; + +IN: editors.cudatext + +SINGLETON: cudatext + +editor-class [ cudatext ] initialize + +HOOK: find-cudatext-path os ( -- path ) + +M: object find-cudatext-path f ; + +M: macosx find-cudatext-path + "com.uvviewsoft.cudatext" find-native-bundle [ + "Contents/MacOS/cudatext" append-path + ] [ + f + ] if* ; + +: cudatext-path ( -- path ) + \ cudatext-path get [ + find-cudatext-path [ "cudatext" ?find-in-path ] unless* + ] unless* ; + +M: cudatext editor-command + [ + cudatext-path , number>string ":" glue , + ] { } make ; diff --git a/basis/editors/cudatext/summary.txt b/basis/editors/cudatext/summary.txt new file mode 100644 index 0000000000..5a5aa13170 --- /dev/null +++ b/basis/editors/cudatext/summary.txt @@ -0,0 +1 @@ +CudeText editor integration -- 2.34.1