about summary refs log tree commit diff
path: root/emacs
diff options
context:
space:
mode:
authorWilliam Carroll <wpcarro@gmail.com>2017-06-15T21·18-0400
committerWilliam Carroll <wpcarro@gmail.com>2017-06-15T21·18-0400
commit708670590fddd42cd1bf6d3849ec94d7ddeaee66 (patch)
tree93c5fd25e4eb170007b72fef77461e68b4e1e427 /emacs
parent1cd470b85dbbf41b6d0e04dc815945096eafbd3d (diff)
Adds vim monkey-patch to edit files within Emacs
Diffstat (limited to 'emacs')
-rw-r--r--emacs/index.sh11
1 files changed, 10 insertions, 1 deletions
diff --git a/emacs/index.sh b/emacs/index.sh
index b7bfd6962011..d8dbe954b2b3 100644
--- a/emacs/index.sh
+++ b/emacs/index.sh
@@ -9,12 +9,21 @@ fi
 
 
 if [ -n "$INSIDE_EMACS" ]; then
-    export EDITOR="emacsclient"
+    export EDITOR="edit-file-in-emacs.sh"
 else
     export EDITOR=$(which vim)
 fi
 
 
+vim () {
+    if [ -n "$INSIDE_EMACS" ]; then
+        emacsclient -e "(find-file-other-window \"$1\")"
+    else
+        eval "$EDITOR \"$1\""
+    fi
+}
+
+
 man () {
     if [ -n "$INSIDE_EMACS" ]; then
         emacsclient -e  "(man \"$1\")"