Fixed some zsh behaviours

This commit is contained in:
Nicola Belluti 2024-09-01 13:07:15 +02:00
parent 4d84a8b1f7
commit 69cc991e0b
2 changed files with 12 additions and 11 deletions

View File

@ -2,18 +2,20 @@ source "$ZDOTDIR/history.zsh"
source "$ZDOTDIR/alias.zsh"
source "$ZDOTDIR/plugins.zsh"
PS1="%F{38}[%n@%m %F{45}%B%~%b%f%F{38}]%f$ "
TIMEFMT=$'real\t%E\nuser\t%U\nsys\t%S'
EDITOR="nvim"
ViSUAL_EDITOR="nvim"
export PS1="%F{38}[%n@%m %F{45}%B%~%b%f%F{38}]%f$ "
export TIMEFMT=$'real\t%E\nuser\t%U\nsys\t%S'
export EDITOR="nvim"
export ViSUAL_EDITOR="nvim"
# Bind Ctrl-left/right arrow to move back/formward one word
# https://unix.stackexchange.com/a/140499
#
bindkey "^[[1;5C" vi-forward-word
bindkey "^[[1;6C" vi-forward-word
bindkey "^[[1;5D" vi-backward-word
bindkey "^[[1;6D" vi-backward-word
# Bind Canc, Home and End to the right functions
# https://stackoverflow.com/a/8645267
bindkey "^[[1;5C" forward-word
bindkey "^[[1;5D" backward-word
bindkey "^[[H" beginning-of-line
bindkey "^[[F" end-of-line
bindkey "^[[3~" delete-char

View File

@ -8,7 +8,6 @@ SAVEHIST=$HISTSIZE
HISTDUP=erase
setopt appendhistory
setopt sharehistory
setopt hist_ignore_space
setopt hist_ignore_all_dups
setopt hist_save_no_dups