.zshrc (3682B)
1 # Start configuration added by Zim Framework install {{{ 2 # 3 # User configuration sourced by interactive shells 4 # 5 6 # ----------------- 7 # Zsh configuration 8 # ----------------- 9 10 # 11 # History 12 # 13 14 # Remove older command from the history if a duplicate is to be added. 15 setopt HIST_IGNORE_ALL_DUPS 16 17 # 18 # Input/output 19 # 20 21 # Set editor default keymap to emacs (`-e`) or vi (`-v`) 22 bindkey -e 23 24 # Prompt for spelling correction of commands. 25 #setopt CORRECT 26 27 # Customize spelling correction prompt. 28 #SPROMPT='zsh: correct %F{red}%R%f to %F{green}%r%f [nyae]? ' 29 30 # Remove path separator from WORDCHARS. 31 WORDCHARS=${WORDCHARS//[\/]} 32 33 # ------------------- 34 # zimfw configuration 35 # ------------------- 36 37 # Use degit instead of git as the default tool to install and update modules. 38 #zstyle ':zim:zmodule' use 'degit' 39 40 # -------------------- 41 # Module configuration 42 # -------------------- 43 44 # 45 # git 46 # 47 48 # Set a custom prefix for the generated aliases. The default prefix is 'G'. 49 #zstyle ':zim:git' aliases-prefix 'g' 50 51 # 52 # input 53 # 54 55 # Append `../` to your input for each `.` you type after an initial `..` 56 #zstyle ':zim:input' double-dot-expand yes 57 58 # 59 # termtitle 60 # 61 62 # Set a custom terminal title format using prompt expansion escape sequences. 63 # See http://zsh.sourceforge.net/Doc/Release/Prompt-Expansion.html#Simple-Prompt-Escapes 64 # If none is provided, the default '%n@%m: %~' is used. 65 #zstyle ':zim:termtitle' format '%1~' 66 67 # 68 # zsh-autosuggestions 69 # 70 71 # Disable automatic widget re-binding on each precmd. This can be set when 72 # zsh-users/zsh-autosuggestions is the last module in your ~/.zimrc. 73 ZSH_AUTOSUGGEST_MANUAL_REBIND=1 74 75 # Customize the style that the suggestions are shown with. 76 # See https://github.com/zsh-users/zsh-autosuggestions/blob/master/README.md#suggestion-highlight-style 77 #ZSH_AUTOSUGGEST_HIGHLIGHT_STYLE='fg=242' 78 79 # 80 # zsh-syntax-highlighting 81 # 82 83 # Set what highlighters will be used. 84 # See https://github.com/zsh-users/zsh-syntax-highlighting/blob/master/docs/highlighters.md 85 ZSH_HIGHLIGHT_HIGHLIGHTERS=(main brackets) 86 87 # Customize the main highlighter styles. 88 # See https://github.com/zsh-users/zsh-syntax-highlighting/blob/master/docs/highlighters/main.md#how-to-tweak-it 89 #typeset -A ZSH_HIGHLIGHT_STYLES 90 #ZSH_HIGHLIGHT_STYLES[comment]='fg=242' 91 92 # ------------------ 93 # Initialize modules 94 # ------------------ 95 96 ZIM_HOME=${ZDOTDIR:-${HOME}}/.zim 97 # Download zimfw plugin manager if missing. 98 if [[ ! -e ${ZIM_HOME}/zimfw.zsh ]]; then 99 if (( ${+commands[curl]} )); then 100 curl -fsSL --create-dirs -o ${ZIM_HOME}/zimfw.zsh \ 101 https://github.com/zimfw/zimfw/releases/latest/download/zimfw.zsh 102 else 103 mkdir -p ${ZIM_HOME} && wget -nv -O ${ZIM_HOME}/zimfw.zsh \ 104 https://github.com/zimfw/zimfw/releases/latest/download/zimfw.zsh 105 fi 106 fi 107 # Install missing modules, and update ${ZIM_HOME}/init.zsh if missing or outdated. 108 if [[ ! ${ZIM_HOME}/init.zsh -nt ${ZIM_CONFIG_FILE:-${ZDOTDIR:-${HOME}}/.zimrc} ]]; then 109 source ${ZIM_HOME}/zimfw.zsh init 110 fi 111 # Initialize modules. 112 source ${ZIM_HOME}/init.zsh 113 114 # ------------------------------ 115 # Post-init module configuration 116 # ------------------------------ 117 118 # 119 # zsh-history-substring-search 120 # 121 122 zmodload -F zsh/terminfo +p:terminfo 123 # Bind ^[[A/^[[B manually so up/down works both before and after zle-line-init 124 for key ('^[[A' '^P' ${terminfo[kcuu1]}) bindkey ${key} history-substring-search-up 125 for key ('^[[B' '^N' ${terminfo[kcud1]}) bindkey ${key} history-substring-search-down 126 for key ('k') bindkey -M vicmd ${key} history-substring-search-up 127 for key ('j') bindkey -M vicmd ${key} history-substring-search-down 128 unset key 129 # }}} End configuration added by Zim Framework install 130 131 # Created by newuser for 5.9 132 133 source ~/.zshrc.local