about summary refs log tree commit diff stats
path: root/vimrc.vim
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 /vimrc.vim
parent1f08b541af47398afb3f64968b2fc5e96c58b7bb (diff)
downloadmu-5e5f569c1777e4062b2d4379ed4b17b9d0b18281.tar.gz
4725 - back to porting the Crenshaw compiler
Diffstat (limited to 'vimrc.vim')
-rw-r--r--vimrc.vim9
1 files changed, 9 insertions, 0 deletions
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()