Preparing zsh for emacs term
This commit is contained in:
parent
1b1f707d9a
commit
a5e1513b61
60
.zshrc
60
.zshrc
|
@ -1,6 +1,27 @@
|
|||
# If you come from bash you might have to change your $PATH.
|
||||
# export PATH=$HOME/bin:/usr/local/bin:$PATH
|
||||
|
||||
if [[ "$TERM" == "dumb" ]]
|
||||
then
|
||||
unsetopt zle
|
||||
unsetopt prompt_cr
|
||||
unsetopt prompt_subst
|
||||
if whence -w precmd >/dev/null; then
|
||||
unfunction precmd
|
||||
fi
|
||||
if whence -w preexec >/dev/null; then
|
||||
unfunction preexec
|
||||
fi
|
||||
PS1='$ '
|
||||
fi
|
||||
# if [ $TERM = tramp ]; then
|
||||
# unset RPROMPT
|
||||
# unset RPS1
|
||||
# PS1="$ "
|
||||
# unsetopt zle
|
||||
# unsetopt rcs # Inhibit loading of further config files
|
||||
# fi
|
||||
|
||||
# Path to your oh-my-zsh installation.
|
||||
export ZSH="/home/initega/.oh-my-zsh"
|
||||
|
||||
|
@ -82,22 +103,49 @@ ENABLE_CORRECTION="true"
|
|||
|
||||
source $ZSH/oh-my-zsh.sh
|
||||
source $HOME/.profile
|
||||
source $HOME/ros/serial/setup.zsh
|
||||
# export PATH="$HOME/bin:$HOME/.local/bin:$PATH"
|
||||
# source $HOME/.alias
|
||||
# source $HOME/ros/serial/setup.zsh
|
||||
source /usr/share/rosbash/roszsh
|
||||
|
||||
DISABLE_UPDATE_PROMPT=true
|
||||
|
||||
ZSH_AUTOSUGGEST_HIGHLIGHT_STYLE='fg=white'
|
||||
ZSH_AUTOSUGGEST_STRATEGY='completion'
|
||||
ZSH_AUTOSUGGEST_STRATEGY=(history completion)
|
||||
|
||||
ZSH_HIGHLIGHT_HIGHLIGHTERS=(main brackets pattern cursor)
|
||||
ZSH_HIGHLIGHT_STYLES[alias]='fg=magenta'
|
||||
ZSH_HIGHLIGHT_STYLES[unknown-token]='fg=green'
|
||||
ZSH_HIGHLIGHT_STYLES[command]='fg=blue'
|
||||
ZSH_HIGHLIGHT_STYLES[builtin]='fg=blue'
|
||||
case "$TERM" in
|
||||
"eterm-color")
|
||||
ZSH_HIGHLIGHT_STYLES[unknown-token]='fg=green'
|
||||
ZSH_HIGHLIGHT_STYLES[command]='fg=blue'
|
||||
ZSH_HIGHLIGHT_STYLES[builtin]='fg=blue'
|
||||
;;
|
||||
*)
|
||||
ZSH_HIGHLIGHT_STYLES[unknown-token]='fg=#2fc81e'
|
||||
ZSH_HIGHLIGHT_STYLES[command]='fg=#9ce8f8'
|
||||
ZSH_HIGHLIGHT_STYLES[builtin]='fg=#9ce8f8'
|
||||
;;
|
||||
esac
|
||||
ZSH_HIGHLIGHT_STYLES[path]='fg=cyan'
|
||||
|
||||
HISTORY_SUBSTRING_SEARCH_FUZZY="t"
|
||||
DISABLE_MAGIC_FUNCTIONS=true
|
||||
|
||||
|
||||
### Fix slowness of pastes with zsh-syntax-highlighting.zsh
|
||||
pasteinit() {
|
||||
OLD_SELF_INSERT=${${(s.:.)widgets[self-insert]}[2,3]}
|
||||
zle -N self-insert url-quote-magic # I wonder if you'd need `.url-quote-magic`?
|
||||
}
|
||||
|
||||
pastefinish() {
|
||||
zle -N self-insert $OLD_SELF_INSERT
|
||||
}
|
||||
zstyle :bracketed-paste-magic paste-init pasteinit
|
||||
zstyle :bracketed-paste-magic paste-finish pastefinish
|
||||
### Fix slowness of pastes
|
||||
|
||||
|
||||
bindkey -v
|
||||
|
||||
|
@ -152,5 +200,5 @@ export KEYTIMEOUT=1
|
|||
# export EDITOR='mvim'
|
||||
# fi
|
||||
|
||||
neofetch
|
||||
# neofetch
|
||||
# exec fish
|
||||
|
|
Loading…
Reference in New Issue