Hi, Here's a diff to make ksh vi mode handle werase more like vi. It's really irritating to have whole paths go away on ^W instead of just the last bit.
--- /usr/src/bin/ksh/vi.c Mon Apr 10 07:38:59 2006 +++ vi.c Wed Jun 3 16:54:07 2009 @@ -416,9 +416,9 @@ vi_hook(int ch) int i; int n = srchlen; - while (n > 0 && isspace(locpat[n - 1])) + while (n > 0 && !is_wordch(locpat[n - 1])) n--; - while (n > 0 && !isspace(locpat[n - 1])) + while (n > 0 && is_wordch(locpat[n - 1])) n--; for (i = srchlen; --i >= n; ) es->linelen -= char_len((unsigned char)locpat[i]); @@ -1598,9 +1598,9 @@ Backword(int argcnt) ncursor = es->cursor; while (ncursor > 0 && argcnt--) { - while (--ncursor >= 0 && isspace(es->cbuf[ncursor])) + while (--ncursor >= 0 && !is_wordch(es->cbuf[ncursor])) ; - while (ncursor >= 0 && !isspace(es->cbuf[ncursor])) + while (ncursor >= 0 && is_wordch(es->cbuf[ncursor])) ncursor--; ncursor++; }