about summary refs log tree commit diff stats
path: root/subx/teensy
diff options
context:
space:
mode:
Diffstat (limited to 'subx/teensy')
-rw-r--r--subx/teensy/vimrc.vim13
1 files changed, 12 insertions, 1 deletions
diff --git a/subx/teensy/vimrc.vim b/subx/teensy/vimrc.vim
index 68b63640..e0fe2c1e 100644
--- a/subx/teensy/vimrc.vim
+++ b/subx/teensy/vimrc.vim
@@ -1 +1,12 @@
-command! -nargs=1 EE exec "vert split teensy/test" . <args> . "*.[cs]"
+" 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