Created
November 13, 2013 18:28
-
-
Save gigawhitlocks/7453896 to your computer and use it in GitHub Desktop.
Opens first argument in a local emacs session that's already running, from the shell on a remote machine.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function evil() { | |
if [ $SSH_CLIENT ]; | |
then if [[ $1 == /* ]]; | |
then ssh ian@$(echo $SSH_CLIENT | awk '{print $1}') -C emacsclient /ubuntu@isw-dev:$1; | |
else ssh ian@$(echo $SSH_CLIENT | awk '{print $1}') -C emacsclient /ubuntu@isw-dev:$(pwd)/$1; | |
fi | |
else vim; | |
fi | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment