hice mi prompt a mano. de nuevo.
This commit is contained in:
parent
00f844f1fd
commit
5f29c0c48b
|
@ -211,7 +211,6 @@ let $FZF_DEFAULT_COMMAND='fd -t f -S -2m -F -H'
|
|||
let g:fzf_buffers_jump = 1
|
||||
let g:fzf_tags_command = 'ctags -R'
|
||||
let g:fzf_history_dir = '~/.local/share/fzf-history'
|
||||
let g:fzf_nvim_statusline = 0
|
||||
let g:fzf_files_options = "--preview 'bat --color \"always\" {}'"
|
||||
|
||||
" only use FZF shortcuts in non diff-mode
|
||||
|
|
|
@ -38,9 +38,9 @@ bindkey -M vicmd '^K' up-history # ^K to previous command.
|
|||
bindkey -M vicmd '^J' down-history # ^J to next command.
|
||||
bindkey -M vicmd 'H' vi-beginning-of-line # Go beginning of line.
|
||||
bindkey -M vicmd 'L' vi-end-of-line # Go end of line.
|
||||
bindkey -M vicmd 'cs' change-surround # Change surround operator.
|
||||
bindkey -M vicmd 'ds' delete-surround # Delete surround operator.
|
||||
bindkey -M vicmd 'ys' add-surround # Add surround operator.
|
||||
bindkey -M vicmd 'cr' change-surround # Change surround operator.
|
||||
bindkey -M vicmd 'dr' delete-surround # Delete surround operator.
|
||||
bindkey -M vicmd 'yr' add-surround # Add surround operator.
|
||||
|
||||
typeset -g -A key
|
||||
|
||||
|
@ -92,4 +92,25 @@ if (( ${+terminfo[smkx]} )) && (( ${+terminfo[rmkx]} )); then
|
|||
zle -N zle-line-finish
|
||||
fi
|
||||
|
||||
# ci"
|
||||
autoload -U select-quoted
|
||||
zle -N select-quoted
|
||||
for m in visual viopp; do
|
||||
for c in {a,i}{\',\",\`}; do
|
||||
bindkey -M $m $c select-quoted
|
||||
done
|
||||
done
|
||||
|
||||
# ci{, ci(, di{ etc..
|
||||
autoload -U select-bracketed
|
||||
zle -N select-bracketed
|
||||
for m in visual viopp; do
|
||||
for c in {a,i}${(s..)^:-'()[]{}<>bB'}; do
|
||||
bindkey -M $m $c select-bracketed
|
||||
done
|
||||
done
|
||||
|
||||
autoload edit-command-line; zle -N edit-command-line
|
||||
bindkey '^e' edit-command-line
|
||||
|
||||
export KEYTIMEOUT=1
|
41
.zshrc
41
.zshrc
|
@ -15,6 +15,7 @@ unset _comp_files
|
|||
promptinit
|
||||
|
||||
autoload -U colors && colors
|
||||
|
||||
unsetopt CASE_GLOB
|
||||
setopt GLOBDOTS
|
||||
setopt NUMERICGLOBSORT
|
||||
|
@ -93,6 +94,7 @@ zstyle ':completion:*:*:kill:*' insert-ids single
|
|||
zstyle ':completion:*:*:kill:*:processes' list-colors '=(#b) #([0-9]#) ([0-9a-z-]#)*=01;34=0=01'
|
||||
zstyle ':completion:*:functions' ignored-patterns '(_*|pre(cmd|exec))'
|
||||
zstyle ':completion:*' accept-exact '*(N)'
|
||||
zstyle ':completion:*' ignore-parents pwd
|
||||
zstyle ':completion:*' rehash true
|
||||
# }}}
|
||||
# Historial {{{
|
||||
|
@ -115,7 +117,6 @@ setopt SHARE_HISTORY
|
|||
# }}}
|
||||
# Plugins y extras {{{
|
||||
foreach extra (
|
||||
agkozak-zsh-prompt/agkozak-zsh-prompt.plugin.zsh
|
||||
zsh-completions/zsh-completions.plugin.zsh
|
||||
forgit/forgit.plugin.zsh
|
||||
up.plugin.zsh
|
||||
|
@ -139,12 +140,6 @@ foreach programa (
|
|||
|
||||
typeset -g ZSH_SYSTEM_CLIPBOARD_TMUX_SUPPORT='true'
|
||||
|
||||
AGKOZAK_BLANK_LINES=1
|
||||
AGKOZAK_CUSTOM_SYMBOLS=( '⇣⇡' '⇣' '⇡' '+' 'x' '!' '>' '?' )
|
||||
AGKOZAK_PROMPT_DIRTRIM=0
|
||||
AGKOZAK_USER_HOST_DISPLAY=0
|
||||
AGKOZAK_MULTILINE=0
|
||||
|
||||
foreach plugin (
|
||||
zsh-autopair/autopair.zsh
|
||||
zsh-syntax-highlighting/zsh-syntax-highlighting.zsh
|
||||
|
@ -153,4 +148,36 @@ foreach plugin (
|
|||
source /usr/share/zsh/plugins/$plugin
|
||||
}
|
||||
# }}}
|
||||
# Prompt {{{
|
||||
function precmd() {
|
||||
# Print a newline before the prompt, unless it's the
|
||||
# first prompt in the process.
|
||||
if [ -z "$NEW_LINE_BEFORE_PROMPT" ]; then
|
||||
NEW_LINE_BEFORE_PROMPT=1
|
||||
elif [ "$NEW_LINE_BEFORE_PROMPT" -eq 1 ]; then
|
||||
echo "\n"
|
||||
fi
|
||||
}
|
||||
|
||||
PS1="%(?..%F{1}(%?%)%f )%F{4}%~ %f%# "
|
||||
|
||||
function zle-keymap-select {
|
||||
if [[ ${KEYMAP} == vicmd ]] ||
|
||||
[[ $1 = 'block' ]]; then
|
||||
echo -ne '\e[2 q'
|
||||
elif [[ ${KEYMAP} == main ]] ||
|
||||
[[ ${KEYMAP} == viins ]] ||
|
||||
[[ ${KEYMAP} = '' ]] ||
|
||||
[[ $1 = 'beam' ]]; then
|
||||
echo -ne '\e[6 q'
|
||||
fi
|
||||
}
|
||||
zle -N zle-keymap-select
|
||||
zle-line-init() {
|
||||
echo -ne "\e[6 q"
|
||||
}
|
||||
zle -N zle-line-init
|
||||
echo -ne '\e[5 q' # Use beam shape cursor on startup.
|
||||
preexec() { echo -ne '\e[6 q' ;} # Use beam shape cursor for each new prompt.
|
||||
# }}}
|
||||
# vim:foldmethod=marker:foldlevel=0
|
||||
|
|
Reference in New Issue