summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--.zshrc17
1 files changed, 16 insertions, 1 deletions
diff --git a/.zshrc b/.zshrc
index f6d1c55..82279d4 100644
--- a/.zshrc
+++ b/.zshrc
@@ -15,7 +15,9 @@ REPORTTIME=10
## define word characters (for stuff like backward-word, forward-word, backward-kill-word,..)
## these are NOT separators but chars considered part of a word
-#WORDCHARS='*?_-.[]~=/&;!#$%^(){}<>' # the default
+## these are NOT respected by e.g. vi-backward-kill-word, it seems
+# WORDCHARS='*?_-.[]~=/&;!#$%^(){}<>' # the default
+## see below how to solve this with select-word-style module
# where zsh looks for functions
@@ -176,6 +178,19 @@ done
# keybindings might have been changed by plugins, etc.
# so they go more to the bottom
+# the vi bindings for these do not respect WORDCHARS and are not replaced by the select-word-style functions
+bindkey -M vicmd 'w' forward-word
+bindkey -M vicmd 'b' backward-word
+bindkey -M viins '^W' backward-kill-word
+
+
+# better word matching
+autoload -U select-word-style
+select-word-style normal
+zstyle ':zle:*' word-style normal
+# these characters do _not_ separate words but are part of words
+zstyle ':zle:*' word-chars '*?[]~;!#$%^(){}<>'
+
# should probably be closer to the bottom than the top?
zgenom load 'https://github.com/nojhan/liquidprompt'