-    done
-    for f in "$@"; do
-        # drop the file onto the running vim instance
-        # see :h terminal-communication
-        echo -e "\e]51;[\"drop\", \"$f\"]\a"
-    done
-}
-alias vi='vim'
+        for f in "$@"; do
+            if [[ "${f:0:1}" == "-" ]]; then
+                echo "Running in Vim's terminal, not accepting options!" >&2
+                return 1
+            fi
+        done
+        for f in "$@"; do
+            # drop the file onto the running vim instance
+            # see :h terminal-communication
+            local abspath=$(realpath $f)
+            echo -e "\e]51;[\"drop\", \"$abspath\"]\a"
+        done
+    }
+fi
+alias vi=nvim