| alias e='emacsclient -q -a emacs' | |
| EDITOR=emacsclient | |
| function e { | |
| tmux new-window -a -n "emacs" "$EDITOR $@" | |
| } | |
| function ee { | |
| tmux split-window "$EDITOR $@" | |
| } | |
| # If we have a tmux session running, attach to it, otherwise, start | |
| # one up....oh, and let's start emacs as a daemon too. | |
| if type tmux >/dev/null 2>&1 | |
| then | |
| if ps -u $USER -o fname | grep tmux >/dev/null | |
| then | |
| if [ -z "$TMUX" ] | |
| then | |
| unalias e | |
| tmux attach | |
| fi | |
| else | |
| emacs --daemon | |
| exec tmux | |
| fi | |
| fi |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment