From 5e5f569c1777e4062b2d4379ed4b17b9d0b18281 Mon Sep 17 00:00:00 2001 From: Kartik Agaram Date: Fri, 26 Oct 2018 10:12:51 -0700 Subject: 4725 - back to porting the Crenshaw compiler --- subx/c | 4 ++++ subx/edit | 2 +- subx/gen | 2 +- subx/run | 2 +- vimrc.vim | 9 +++++++++ 5 files changed, 16 insertions(+), 3 deletions(-) create mode 100755 subx/c 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() + +" 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() -- cgit 1.4.1-2-gfad0