Zsh Mailing List Archive
Messages sorted by: Reverse Date, Date, Thread, Author

Re: delete-word does not delete the entire word...



On Oct 12,  7:31pm, Peter Stephenson wrote:
} 
} If you have 4.1, much of the work is done for you; see the description
} of match-words-by-style in the zshcontrib manual.
[...]
} A side effect is that you can decide using styles what constitutes a
} word, as described in the same section of the manual.

I almost mentioned the -match functions, but decided not to because the
manual section for them has no examples of the corresponding styles.

} [ delete-whole-word ] :
}
} emulate -L zsh
} setopt extendedglob

Why does this need extendedglob?

} # Move the cursor and delete the block in one go for the
} # purpose of yanking.
} (( CURSOR = pos1 ))
} BUFFER="${BUFFER[1,pos1]}${BUFFER[pos2,-1]}"

I'm a little puzzled by that comment.  This is delete-whole-word, not
kill-whole-word, so there shouldn't be any expectation of yanking ...
and in fact when I try it I can't yank the word that was deleted.

It's clear from kill-word-match that BUFFER edits are not automatically
propagated to CUTBUFFER.  Which makes sense ...



Messages sorted by: Reverse Date, Date, Thread, Author