about summary refs log tree commit diff stats
path: root/subx
diff options
context:
space:
mode:
authorKartik Agaram <vc@akkartik.com>2018-09-21 13:51:43 -0700
committerKartik Agaram <vc@akkartik.com>2018-09-21 13:51:43 -0700
commit694d8485d49ecb4fb35c8cf0dacd59f960d2999e (patch)
treee938df0920de3481bc4dd91e5fdfc46eca325f8e /subx
parentcaaeccd68e2baf49c4df5ada5799cffcecb51c60 (diff)
downloadmu-694d8485d49ecb4fb35c8cf0dacd59f960d2999e.tar.gz
4568
Get the 'edit' script working again with the 'EE' command in Vim.
Diffstat (limited to 'subx')
-rwxr-xr-xsubx/edit9
1 files changed, 7 insertions, 2 deletions
diff --git a/subx/edit b/subx/edit
index 03a2c284..517e1f75 100755
--- a/subx/edit
+++ b/subx/edit
@@ -7,9 +7,14 @@ then
   exit 1
 fi
 
+if [[ $EDITOR == *'vim'* ]]
+then
+  LOCAL_SETTINGS='-S vimrc.vim'
+fi
+
 if [[ $1 == 'ex'* ]]
 then
-  eval $EDITOR examples/$1.subx
+  eval $EDITOR $LOCAL_SETTINGS examples/$1.subx
 else
-  eval $EDITOR apps/$1.subx
+  eval $EDITOR $LOCAL_SETTINGS apps/$1.subx
 fi