martanne / vis

A vi-like editor based on Plan 9's structural regular expressions

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

dw should not delete the new line

FoundOne opened this issue · comments

How to reproduce:

  1. Open a text file.
  2. Go to on the last word of a line.
  3. Press dw.

What happens:
It deletes the word and the next new line.

What should happen:
It should just delete the word.

Edit: I noticed that it happens with any whitespace.

I believe vis differ from vim regarding this as described here

Oh, so it's supposed to do that. Ok. I'm sorry.

Yes, this can be a bit confusing at first. To just delete the word, use de.

(could you close the issue if this seems reasonable?)

Yes. Thanks for the advice.

This is not so much about newline address ability, but the fact that w and dw i.e. when used with an operator does not cover the same range (in vim).