about summary refs log tree commit diff stats
diff options
context:
space:
mode:
authorKartik Agaram <vc@akkartik.com>2018-10-26 10:12:51 -0700
committerKartik Agaram <vc@akkartik.com>2018-10-26 10:16:02 -0700
commit5e5f569c1777e4062b2d4379ed4b17b9d0b18281 (patch)
treec3b07fcd33ece2e02be3f9b5656e278282ed57f1
parent1f08b541af47398afb3f64968b2fc5e96c58b7bb (diff)
downloadmu-5e5f569c1777e4062b2d4379ed4b17b9d0b18281.tar.gz
4725 - back to porting the Crenshaw compiler
-rwxr-xr-xsubx/c4
-rwxr-xr-xsubx/edit2
-rwxr-xr-xsubx/gen2
-rwxr-xr-xsubx/run2
-rw-r--r--vimrc.vim9
5 files changed, 16 insertions, 3 deletions
diff --git a/subx/c b/subx/c
new file mode 100755
index 00000000..9583b78e
--- /dev/null
+++ b/subx/c
@@ -0,0 +1,4 @@
+#!/usr/bin/env zsh
+# Make opening various versions of the Crenshaw compiler even more convenient.
+
+edit crenshaw$1
diff --git a/subx/edit b/subx/edit
index 517e1f75..ef20d85f 100755
--- a/subx/edit
+++ b/subx/edit
@@ -1,5 +1,5 @@
 #!/usr/bin/env zsh
-# Open a specific example.
+# Open commonly-used SubX programs.
 
 if [ $# -eq 0 ]
 then
diff --git a/subx/gen b/subx/gen
index fb2e7532..846d4186 100755
--- a/subx/gen
+++ b/subx/gen
@@ -1,5 +1,5 @@
 #!/usr/bin/env zsh
-# Build a specific example.
+# Build commonly-used SubX programs.
 
 if [[ $1 == 'ex'* ]]
 then
diff --git a/subx/run b/subx/run
index 043ba6e1..8c13a3d8 100755
--- a/subx/run
+++ b/subx/run
@@ -1,5 +1,5 @@
 #!/usr/bin/env zsh
-# Simulate a specific example using subx.
+# Run commonly-used SubX programs using the SubX VM.
 
 if [ $# -eq 0 ]
 then
diff --git a/vimrc.vim b/vimrc.vim
index f76396da..d5f0e809 100644
--- a/vimrc.vim
+++ b/vimrc.vim
@@ -81,3 +81,12 @@ function! GrepSubX(regex)
   silent exec "r !grep -h '".a:regex."' *.subx */*.subx"
 endfunction
 command! -nargs=1 G call GrepSubX(<q-args>)
+
+" temporary helpers while we port https://github.com/akkartik/crenshaw to apps/crenshaw*.subx
+function! Orig()
+  let l:p = expand("%:t:r")
+  if l:p =~ "^crenshaw\\d*-\\d*$"
+    exec "vert split crenshaw/tutor" . substitute(expand("%:t:r"), "^crenshaw\\(\\d*\\)-\\(\\d*\\)$", "\\1.\\2", "") . ".pas"
+  endif
+endfunction
+command! O call Orig()