diff options
author | David Runge <dave@sleepmap.de> | 2021-09-28 23:16:59 +0200 |
---|---|---|
committer | David Runge <dave@sleepmap.de> | 2021-09-28 23:16:59 +0200 |
commit | cffcb550a8200fc027432ba7567b6796999c4ef6 (patch) | |
tree | 04dbd24b544a388cf997b81e150641063b82c1bf | |
parent | 3ac8e0f994839f3c972033bcb12421081ebeb683 (diff) | |
download | dotfiles-cffcb550a8200fc027432ba7567b6796999c4ef6.tar.gz dotfiles-cffcb550a8200fc027432ba7567b6796999c4ef6.tar.bz2 dotfiles-cffcb550a8200fc027432ba7567b6796999c4ef6.tar.xz dotfiles-cffcb550a8200fc027432ba7567b6796999c4ef6.zip |
zshrc: early include of functions
.zshrc:
To allow proper use of the functions, add them early.
Add back settings for vi mode.
Add back prepend-sudo.
-rw-r--r-- | .zshrc | 11 |
1 files changed, 9 insertions, 2 deletions
@@ -1,4 +1,6 @@ +# functions +for config_file ($HOME/.config/zsh/functions/*.zsh) source $config_file # dircolors # Set colors for ls output eval $(dircolors ~/.dircolors) @@ -12,6 +14,10 @@ zle -N self-insert url-quote-magic # enable vi mode setopt -o vi +bindkey -v +bindkey '^r' history-incremental-search-backward +bindkey '^a' beginning-of-line +bindkey '^e' end-of-line # General setopt BRACE_CCL # Allow brace character class list expansion. @@ -170,6 +176,9 @@ for keymap in 'emacs' 'viins'; do # Complete in the middle of word. bindkey -M "$keymap" "$key_info[Control]I" expand-or-complete + + # Insert 'sudo ' at the beginning of the line. + bindkey -M "$keymap" "$key_info[Control]X$key_info[Control]S" prepend-sudo done # Set the key layout to vi mode @@ -430,8 +439,6 @@ for p in ${history_substring}; do fi done -# functions -for config_file ($HOME/.config/zsh/functions/*.zsh) source $config_file # includes for config_file ($HOME/.config/zsh/includes/*.zsh) source $config_file |