X-Git-Url: https://ruderich.org/simon/gitweb/?a=blobdiff_plain;f=zsh%2Frc;h=7ccbe91e1766df634eedaf45b1a5a50c058cb1d3;hb=17c4bdffc7d5914f39932f4b2cb1a0791d227a00;hp=902d184bc4c0970c17d7ec06b6493a163c0b2873;hpb=2dad868f3aa83676dde4b9891c49389e77b90a7e;p=config%2Fdotfiles.git diff --git a/zsh/rc b/zsh/rc index 902d184..7ccbe91 100644 --- a/zsh/rc +++ b/zsh/rc @@ -5,9 +5,6 @@ source_debug "sourcing ~/.zsh/rc" # MISCELLANEOUS SETTINGS -# Use Vi(m) style key bindings. -bindkey -v - # Be paranoid, new files are readable/writable by me only. umask 077 @@ -33,6 +30,22 @@ setopt extendedglob setopt ignoreeof +# KEY BINDINGS + +# Not all bindings are done here, only those not specific to a given section. + +# Use Vi(m) style key bindings. +bindkey -v + +# Also use jj to exit insert mode. +bindkey 'jj' vi-cmd-mode + +# I don't need the arrow keys, I use ^N and ^P for this (see below). +bindkey -r '^[OA' '^[OB' '^[OC' '^[OD' '^[[A' '^[[B' '^[[C' '^[[D' +# Also not in Vi mode. +bindkey -a -r '^[OA' '^[OB' '^[OC' '^[OD' '^[[A' '^[[B' '^[[C' '^[[D' + + # FUNCTION SETTINGS # Make sure every entry in $fpath is unique. @@ -334,6 +347,9 @@ if [[ $TERM == screen* || $TERM == xterm* || $TERM == rxvt* ]]; then window_title() { print -n "\e]2;$1\e\\" } + else + # Fallback if another TERM is used. + window_title() { } fi # Add the preexec() and precmd() hooks.