mirror of
https://github.com/Matir/skel.git
synced 2026-05-25 21:19:09 -07:00
Drop more prezto deps.
This commit is contained in:
@@ -29,14 +29,11 @@ zstyle ':prezto:load' pmodule-dirs $HOME/.zprezto_custom
|
||||
zstyle ':prezto:load' pmodule \
|
||||
'environment' \
|
||||
'terminal' \
|
||||
'editor' \
|
||||
'completion' \
|
||||
'matir' \
|
||||
'git' \
|
||||
'python' \
|
||||
'syntax-highlighting' \
|
||||
'history-substring-search' \
|
||||
'prompt'
|
||||
'history-substring-search'
|
||||
|
||||
#
|
||||
# Autosuggestions
|
||||
|
||||
@@ -25,6 +25,7 @@ setopt \
|
||||
pushdtohome \
|
||||
sharehistory
|
||||
unsetopt beep histbeep listbeep flowcontrol
|
||||
# vi keybindings
|
||||
bindkey -v
|
||||
|
||||
# Allow core files
|
||||
@@ -56,7 +57,7 @@ unsetopt cdablevars
|
||||
# Deduplicate the path
|
||||
typeset -U path
|
||||
|
||||
# Keybindings
|
||||
# Additional Keybindings
|
||||
bindkey '^[[A' history-search-backward
|
||||
bindkey '^[[B' history-search-forward
|
||||
# ctrl-arrow keys
|
||||
@@ -66,7 +67,7 @@ bindkey '^P' up-history
|
||||
bindkey '^N' down-history
|
||||
bindkey '^?' 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 '^r' history-incremental-search-backward
|
||||
|
||||
@@ -74,13 +75,17 @@ bindkey '^r' history-incremental-search-backward
|
||||
if [[ $- == *i* ]] ; then
|
||||
if [[ -e $HOME/.aliases ]] ; then source $HOME/.aliases ; fi
|
||||
# zsh-only-ism to avoid error if glob doesn't expand
|
||||
for file in $HOME/.zshrc.d/*(N) ; do source "$file" ; done
|
||||
# extra completions
|
||||
fpath=(~/.zshrc.completions $fpath)
|
||||
for file in $HOME/.zshrc.d/*.zsh(N) ; do source "$file" ; done
|
||||
# extra completions, prompt
|
||||
fpath=(~/.zshrc.completions ~/.zshrc.d/matir_prompt $fpath)
|
||||
# Completion
|
||||
zstyle :compinstall filename "${HOME}/.zshrc"
|
||||
zstyle ':completion:*' users root ${USER}
|
||||
# Modules after fpath
|
||||
autoload -Uz compinit && compinit
|
||||
autoload -Uz promptinit && promptinit
|
||||
# Prompt
|
||||
prompt matir
|
||||
fi
|
||||
|
||||
# In case ack is named ack-grep
|
||||
|
||||
@@ -30,25 +30,23 @@ function prompt_matir_setup {
|
||||
PROMPT+='%{$fg[blue]%}${vcs_info_msg_0_}' # VCS info
|
||||
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
|
||||
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+=${show_return}
|
||||
RPROMPT+='%? '
|
||||
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 {
|
||||
vcs_info
|
||||
if (( $+functions[python-info] )); then
|
||||
Reference in New Issue
Block a user