forked from colonelpanic/dotfiles
Properly set EDITOR for zsh inline editing. GIT_EDITOR actually needs to
be different becaseu of the way that it works.
This commit is contained in:
parent
ed0f2dd469
commit
9b44d35171
@ -1,4 +1,5 @@
|
|||||||
source ~/.lib/shellrc/functions.sh
|
source ~/.lib/shellrc/functions.sh
|
||||||
|
source ~/.lib/shellrc/emacs.sh
|
||||||
function add_to_front_of_path {
|
function add_to_front_of_path {
|
||||||
export PATH=$@:$(echo $PATH | sed "s|:*$@||g" | sed "s|^:||")
|
export PATH=$@:$(echo $PATH | sed "s|:*$@||g" | sed "s|^:||")
|
||||||
}
|
}
|
||||||
|
@ -48,7 +48,7 @@ function existing_emacs {
|
|||||||
}
|
}
|
||||||
|
|
||||||
function emacs_make_frame_if_none_exists {
|
function emacs_make_frame_if_none_exists {
|
||||||
emacsclient -e '(make-frame-if-none-exists-and-focus)' --server-file=$1
|
emacsclient -e '(make-frame-if-none-exists-and-focus)' --server-file=$1 > /dev/null
|
||||||
focus_emacs
|
focus_emacs
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -71,5 +71,7 @@ function emacs_open {
|
|||||||
}
|
}
|
||||||
|
|
||||||
# Make emacs the default editor.
|
# Make emacs the default editor.
|
||||||
export EDITOR="zsh -c 'source ~/.zshrc && emacs_open '"'"$@"'
|
export EDITOR='emacs_open'
|
||||||
export VISUAL="$EDITOR"
|
export VISUAL="$EDITOR"
|
||||||
|
# This is ugly as sin but I can't figure out how else to do it.
|
||||||
|
export GIT_EDITOR="zsh -c 'source ~/.zshrc && emacs_open '"'"$@"'
|
||||||
|
Loading…
Reference in New Issue
Block a user