Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

This makes Alt-Backspace do the same thing as Ctrl-W, which is delete-everything-until-the-next-space. I'm missing the delete-last-segment-of-the-path function.

Edit: I know I can customize the word style using $WORDCHARS, or 'autoload select-word-style'; my problem is that I'm used to having the capability to use two different word styles at once.

I'm looking through the command list in zshzle(1), and I'm a bit confused about the differences between backward-delete-word and backward-kill-word. Some short experiments I did failed to notice any differences (foo/bar/baz M-x backward-delete-word deletes foo/bar/baz). There's also vi-backward-kill-word which deletes 'baz', then '/', then 'bar', then '/', then 'foo'. I want a key to delete 'baz', then 'bar/', then 'foo', and I've no idea how to get it...



Hrmm. It works as you want for me, but there may be some other config item I've set.

The other alternative is to try:

    autoload -U select-word-type
    select-word-type bash
which should override C-w to do what you want. I haven't looked at it enough to see if you can get both behaviours simultaneously though (and it requires a fairly recent zsh iirc)




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: