chiark / gitweb /
dot/gitconfig.in: Map author names through `.mailmap' if available.
[profile] / dot / zshrc
index 2e86a7dfebd44c5d2a9aa9e507878864543eadab..736b37447839fe872b79d3b4463b99d668bd71de 100644 (file)
--- a/dot/zshrc
+++ b/dot/zshrc
@@ -64,6 +64,27 @@ bindkey "\e^l" up-case-word-shell
 bindkey "\ec" capitalize-word-bash
 bindkey "\e^c" capitalize-word-shell
 
+bindkey "\ep" history-beginning-search-backward
+bindkey "\en" history-beginning-search-forward
+
+setopt interactive_comments
+bindkey "\e#" pound-insert
+
+__mdw_delete_horizontal_space () {
+  LBUFFER=${LBUFFER%%[[:space:]]##}
+  RBUFFER=${RBUFFER##[[:space:]]##}
+}
+zle -N delete-horizontal-space __mdw_delete_horizontal_space
+bindkey "\e\\" delete-horizontal-space
+
+__mdw_just_one_space () {
+  LBUFFER="${LBUFFER%%[[:space:]]##} "
+  RBUFFER=${RBUFFER##[[:space:]]##}
+}
+zle -N just-one-space __mdw_just_one_space
+bindkey "\e " just-one-space
+
+
 ###--------------------------------------------------------------------------
 ### Completion.
 
@@ -93,18 +114,20 @@ HISTFILE=~/.zsh-history
 HISTSIZE=1000
 SAVEHIST=1000
 
-setopt appendhistory
 unsetopt auto_cd
 unsetopt auto_menu
 unsetopt bash_auto_list
 unsetopt beep
 setopt extendedglob
+unsetopt flow_control
+setopt hist_ignore_all_dups
 setopt ksh_glob
 setopt list_ambiguous
 setopt list_packed
 unsetopt nomatch
 unsetopt menu_complete
 setopt notify
+setopt share_history
 
 zshaddhistory () {
   case "$1" in