# MISCELLANEOUS SETTINGS
-# Use Vi(m) style key bindings.
-bindkey -v
-
# Be paranoid, new files are readable/writable by me only.
umask 077
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 -M viins 'jj' vi-cmd-mode
+
+# I don't need the arrow keys, I use ^N and ^P for this (see below).
+bindkey -M viins -r '^[OA'
+bindkey -M viins -r '^[OB'
+bindkey -M viins -r '^[OC'
+bindkey -M viins -r '^[OD'
+bindkey -M viins -r '^[[A'
+bindkey -M viins -r '^[[B'
+bindkey -M viins -r '^[[C'
+bindkey -M viins -r '^[[D'
+# Also not in Vi mode.
+bindkey -M vicmd -r '^[OA'
+bindkey -M vicmd -r '^[OB'
+bindkey -M vicmd -r '^[OC'
+bindkey -M vicmd -r '^[OD'
+bindkey -M vicmd -r '^[[A'
+bindkey -M vicmd -r '^[[B'
+bindkey -M vicmd -r '^[[C'
+bindkey -M vicmd -r '^[[D'
+
+
# FUNCTION SETTINGS
# Make sure every entry in $fpath is unique.