X-Git-Url: https://git.netwichtig.de/gitweb/?a=blobdiff_plain;f=.zshrc;h=82279d4dcaa1a1ae9c69510799a0789ee3c652f9;hb=9bf149bcfa8a2b41739c9064a461a2f22781e548;hp=f6d1c55c83a7284b4bda404421451dfeea046607;hpb=f3a7f35d857a19767d765f6d9b0656f12df47c62;p=user%2Fhenk%2Fvcsh%2Fzsh.git 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'