about summary refs log tree commit diff stats
path: root/vimrc.vim
diff options
context:
space:
mode:
authorKartik Agaram <vc@akkartik.com>2018-07-07 13:54:16 -0700
committerKartik Agaram <vc@akkartik.com>2018-07-07 13:54:16 -0700
commitbc394aaf39da72d980933a720b6deb8876036c07 (patch)
tree5da22de61ca44b9126de927d157c003d5808794b /vimrc.vim
parentbbd9c1f9abf44c90117e0e25b629902f0fb06a73 (diff)
downloadmu-bc394aaf39da72d980933a720b6deb8876036c07.tar.gz
4323
Diffstat (limited to 'vimrc.vim')
-rw-r--r--vimrc.vim13
1 files changed, 13 insertions, 0 deletions
diff --git a/vimrc.vim b/vimrc.vim
index 08ab8f13..2e11238b 100644
--- a/vimrc.vim
+++ b/vimrc.vim
@@ -51,3 +51,16 @@ augroup END
 "   starting vim or opening a buffer without a file name (ok to do nothing)
 "   opening a second file in a new or existing window (shouldn't mess up existing highlighting)
 "   reloading an existing file (shouldn't mess up existing highlighting)
+
+" assumes CWD is subx/
+command! -nargs=1 EE call EditSubx(<f-args>)
+
+function! EditSubx(arg)
+  " run commands silently because we may get an error loading EditSubx from a
+  " different directory.
+  if a:arg =~ "test.*"
+    exec "silent! vert split teensy/" . a:arg . "*.[cs]"
+  else
+    exec "silent! vert split " . a:arg . "*.subx"
+  endif
+endfunction