~mdw
/
profile
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (from parent 1:
d7b20e5
)
dot/zshrc: `delete-horizontal-space' (M-\) and `just-one-space' (M-SPC).
author
Mark Wooding
<mdw@distorted.org.uk>
Mon, 7 Aug 2017 23:57:36 +0000
(
00:57
+0100)
committer
Mark Wooding
<mdw@distorted.org.uk>
Tue, 8 Aug 2017 01:00:25 +0000
(
02:00
+0100)
dot/zshrc
patch
|
blob
|
blame
|
history
diff --git
a/dot/zshrc
b/dot/zshrc
index
2e86a7d
..
e332557
100644
(file)
--- 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
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.
###--------------------------------------------------------------------------
### Completion.