Drop more prezto deps.

This commit is contained in:
David Tomaschik
2019-09-27 13:16:39 -07:00
parent cc94650bad
commit b096fd2a24
3 changed files with 21 additions and 21 deletions

View File

@@ -29,14 +29,11 @@ zstyle ':prezto:load' pmodule-dirs $HOME/.zprezto_custom
zstyle ':prezto:load' pmodule \ zstyle ':prezto:load' pmodule \
'environment' \ 'environment' \
'terminal' \ 'terminal' \
'editor' \
'completion' \ 'completion' \
'matir' \
'git' \ 'git' \
'python' \ 'python' \
'syntax-highlighting' \ 'syntax-highlighting' \
'history-substring-search' \ 'history-substring-search'
'prompt'
# #
# Autosuggestions # Autosuggestions

View File

@@ -25,6 +25,7 @@ setopt \
pushdtohome \ pushdtohome \
sharehistory sharehistory
unsetopt beep histbeep listbeep flowcontrol unsetopt beep histbeep listbeep flowcontrol
# vi keybindings
bindkey -v bindkey -v
# Allow core files # Allow core files
@@ -56,7 +57,7 @@ unsetopt cdablevars
# Deduplicate the path # Deduplicate the path
typeset -U path typeset -U path
# Keybindings # Additional Keybindings
bindkey '^[[A' history-search-backward bindkey '^[[A' history-search-backward
bindkey '^[[B' history-search-forward bindkey '^[[B' history-search-forward
# ctrl-arrow keys # ctrl-arrow keys
@@ -66,7 +67,7 @@ bindkey '^P' up-history
bindkey '^N' down-history bindkey '^N' down-history
bindkey '^?' backward-delete-char bindkey '^?' backward-delete-char
bindkey '^h' backward-delete-char bindkey '^h' backward-delete-char
# ok, a few convenience bindings # ok, a few emacs convenience bindings
bindkey '^w' backward-kill-word bindkey '^w' backward-kill-word
bindkey '^r' history-incremental-search-backward bindkey '^r' history-incremental-search-backward
@@ -74,13 +75,17 @@ bindkey '^r' history-incremental-search-backward
if [[ $- == *i* ]] ; then if [[ $- == *i* ]] ; then
if [[ -e $HOME/.aliases ]] ; then source $HOME/.aliases ; fi if [[ -e $HOME/.aliases ]] ; then source $HOME/.aliases ; fi
# zsh-only-ism to avoid error if glob doesn't expand # zsh-only-ism to avoid error if glob doesn't expand
for file in $HOME/.zshrc.d/*(N) ; do source "$file" ; done for file in $HOME/.zshrc.d/*.zsh(N) ; do source "$file" ; done
# extra completions # extra completions, prompt
fpath=(~/.zshrc.completions $fpath) fpath=(~/.zshrc.completions ~/.zshrc.d/matir_prompt $fpath)
# Completion # Completion
zstyle :compinstall filename "${HOME}/.zshrc" zstyle :compinstall filename "${HOME}/.zshrc"
zstyle ':completion:*' users root ${USER} zstyle ':completion:*' users root ${USER}
# Modules after fpath
autoload -Uz compinit && compinit autoload -Uz compinit && compinit
autoload -Uz promptinit && promptinit
# Prompt
prompt matir
fi fi
# In case ack is named ack-grep # In case ack is named ack-grep

View File

@@ -30,25 +30,23 @@ function prompt_matir_setup {
PROMPT+='%{$fg[blue]%}${vcs_info_msg_0_}' # VCS info PROMPT+='%{$fg[blue]%}${vcs_info_msg_0_}' # VCS info
PROMPT+='%{$fg[white]%}%#%{$reset_color%} ' # prompt symbol PROMPT+='%{$fg[white]%}%#%{$reset_color%} ' # prompt symbol
# Editor options
zstyle ':prezto:module:editor:info:keymap:primary' format ''
zstyle ':prezto:module:editor:info:keymap:primary:insert' format 'I'
zstyle ':prezto:module:editor:info:keymap:primary:overwrite' format 'O'
zstyle ':prezto:module:editor:info:keymap:alternate' format ' [VICMD]'
zstyle ':prezto:module:editor:info:completing' format '...'
# Rprompt setup # Rprompt setup
local show_return="✘ " local show_return="✘ "
# Default is to show the return value
if zstyle -T ':prezto:module:prompt' show-return-val; then
show_return+='%? '
fi
RPROMPT='%(?:: %{$fg[red]%}' RPROMPT='%(?:: %{$fg[red]%}'
RPROMPT+=${show_return} RPROMPT+=${show_return}
RPROMPT+='%? '
RPROMPT+='%{$reset_color%})' RPROMPT+='%{$reset_color%})'
RPROMPT+='${editor_info[keymap]}' RPROMPT+='${PROMPT_VIMODE}'
} }
function zle-keymap-select {
# Add prompt info
PROMPT_VIMODE="${${KEYMAP/vicmd/ [VICMD]}/(main|viins)/}"
zle reset-prompt
}
zle -N zle-keymap-select
function prompt_matir_precmd { function prompt_matir_precmd {
vcs_info vcs_info
if (( $+functions[python-info] )); then if (( $+functions[python-info] )); then