summaryrefslogtreecommitdiff
path: root/config/zsh
diff options
context:
space:
mode:
Diffstat (limited to 'config/zsh')
-rwxr-xr-xconfig/zsh/zshrc29
1 files changed, 13 insertions, 16 deletions
diff --git a/config/zsh/zshrc b/config/zsh/zshrc
index 4afbbc1..5805115 100755
--- a/config/zsh/zshrc
+++ b/config/zsh/zshrc
@@ -1,5 +1,3 @@
-# Suleyman's zsh interactive shell config at "https://git.farajli.net/slcf"
-
PROMPT="%B%F{red}%(?..%? )%B%F{blue}%n%b%f@%m %B%~ %% %b"
# Git integration
@@ -20,11 +18,11 @@ autoload -U compinit
zstyle ':completion:*' menu select
zmodload zsh/complist
compinit
-_comp_options+=(globdots) # Include hidden files.
+_comp_options+=(globdots) # Include hidden files.
# vi mode
-bindkey -v # Vi mode.
-export KEYTIMEOUT=1 # Set escape delay to 0.01 sec.
+bindkey -v # Vi mode.
+export KEYTIMEOUT=0 # Set escape delay to 0.01 sec.
# Use vim keys in tab complete menu:
bindkey -M menuselect 'h' vi-backward-char
@@ -33,7 +31,6 @@ bindkey -M menuselect 'l' vi-forward-char
bindkey -M menuselect 'j' vi-down-line-or-history
bindkey -v '^?' backward-delete-char
-
# Change cursor shape for different vi modes.
function zle-keymap-select () {
case "${KEYMAP}" in
@@ -50,23 +47,23 @@ zle-line-init() {
echo -ne "\e[5 q"
}
zle -N zle-line-init
-echo -ne '\e[5 q' # Use beam shape cursor on startup.
-preexec() { echo -ne '\e[5 q' ;} # Use beam shape cursor for each new prompt.
-
+echo -ne '\e[5 q' # Use beam shape cursor on startup.
+preexec() { echo -ne '\e[5 q' ;} # Use beam shape cursor for each new prompt.
# Options
-setopt autocd # Automatically cd into typed directory.
-stty stop undef # Disable ctrl-s to freeze terminal.
-setopt interactive_comments
-unsetopt nomatch
-setopt INC_APPEND_HISTORY # Add commands to history when they are run.
-setopt HIST_FIND_NO_DUPS # Don't show duplicate commands when backward searching.
+setopt autocd # Automatically cd into typed directory.
+stty stop undef # Disable ctrl-s to freeze terminal.
+setopt interactive_comments # Write comments in interactive shell
+unsetopt nomatch # Allow unmatched globs without error (leave pattern as-is)
+setopt INC_APPEND_HISTORY # Add commands to history when they are run.
+setopt HIST_FIND_NO_DUPS # Don't show duplicate commands when backward searching.
# Custom keybinds
bindkey '^R' history-incremental-search-backward
+bindkey -s '^f' '^uls\n'
bindkey -s '^o' '^ulfcd\n'
-bindkey -s '^f' '^ucd "$(dirname "$(fzf --reverse)")"\n'
bindkey -s '^v' '^u!!\n'
+bindkey ^@ vi-cmd-mode
if [ -f "${XDG_CONFIG_HOME:-$HOME/.config}/shell/aliasrc" ];then
source "${XDG_CONFIG_HOME:-$HOME/.config}/shell/aliasrc"