Run an instance of emacs per directory.
This commit is contained in:
parent
d60be4274d
commit
b32765b9c5
@ -1,6 +1,3 @@
|
||||
alias emacs="emacsclient -c -n --server-filename=$(pwd)"
|
||||
alias temacs="emacsclient -t"
|
||||
alias cemacs="emacsclient -c -n"
|
||||
alias tmux="tmux -2"
|
||||
alias reload_tmux_conf="tmux source-file .tmux.conf"
|
||||
alias tmux_cb_to_remote_cb='tmux saveb - | linux_nc_paste_to_remote_clipboard'
|
||||
|
12
dotfiles/lib/shellrc/emacs.sh
Normal file
12
dotfiles/lib/shellrc/emacs.sh
Normal file
@ -0,0 +1,12 @@
|
||||
alias emacs='_emacs -c'
|
||||
alias cemacs'_emacs -c'
|
||||
alias temacs'_emacs -t'
|
||||
|
||||
function _emacs {
|
||||
test -z "$(ps aux | grep -v grep | grep -i "\emacs -nw --daemon=.*`dotted_directory`")" && \emacs --daemon="$(dotted_directory)"
|
||||
emacsclient $* -n --server-file="$(dotted_directory)"
|
||||
}
|
||||
|
||||
function dotted_directory {
|
||||
pwd | sed "s:/:.:g"
|
||||
}
|
Loading…
Reference in New Issue
Block a user