Skip to content

Commit

Permalink
Added missing configuration, fixed word style selection
Browse files Browse the repository at this point in the history
  • Loading branch information
psprint committed Jan 10, 2016
1 parent 079bef9 commit 75db66e
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 1 deletion.
12 changes: 12 additions & 0 deletions .config/zew/zew.conf
@@ -0,0 +1,12 @@
# How should Ctrl-W (kill word) and Alt-r (transpose word)
# recognize words. Possible values:
#
# bash Word characters are alphanumeric characters only.
# normal As in normal shell operation: word characters are alphanumeric characters plus
# any characters present in the string given by the parameter $WORDCHARS.
# shell Words are complete shell command arguments, possibly including complete quoted strings, or
# any tokens special to the shell.
# whitespace Words are any set of characters delimited by whitespace.
# default Restore the default settings; this is usually the same as `normal' with default $WORDCHARS.

local zew_word_style=bash
4 changes: 3 additions & 1 deletion zsh-editing-workbench.plugin.zsh
Expand Up @@ -50,11 +50,13 @@ bindkey '^[t' zew-transpose-shell-words
# Alt-m to copy previous shell word
bindkey "^[m" copy-prev-shell-word

select-word-style "$zew_word_style"
# Select chosen word style
[[ "$zew_word_style" = "bash" || "$zew_word_style" = "normal" ||
"$zew_word_style" = "shell" || "$zew_word_style" = "bash" ||
"$zew_word_style" = "whitespace" || "$zew_word_style" = "default" ]] || zew_word_style="bash"

select-word-style "$zew_word_style"

# Ctrl-W to kill word according to configured style
bindkey "^W" backward-kill-word

Expand Down

0 comments on commit 75db66e

Please sign in to comment.