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 \
|
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
|
||||||
|
|||||||
@@ -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
|
||||||
|
|||||||
@@ -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
|
||||||
Reference in New Issue
Block a user