X-Git-Url: https://git.distorted.org.uk/~mdw/profile/blobdiff_plain/d7b20e5c72116b05dfb41ef35f288cd9b7940402..c510f8b9c8bea8595423a6ce7760bdc06cd73adb:/dot/zshrc diff --git a/dot/zshrc b/dot/zshrc index 2e86a7d..e332557 100644 --- a/dot/zshrc +++ b/dot/zshrc @@ -64,6 +64,21 @@ bindkey "\e^l" up-case-word-shell bindkey "\ec" capitalize-word-bash bindkey "\e^c" capitalize-word-shell +__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.