martanne / vis

A vi-like editor based on Plan 9's structural regular expressions
Other
4.21k stars 258 forks source link

dw should not delete the new line #923

Closed FoundOne closed 3 years ago

FoundOne commented 3 years ago

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.

erf commented 3 years ago

I believe vis differ from vim regarding this as described here

FoundOne commented 3 years ago

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

ninewise commented 3 years ago

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?)

FoundOne commented 3 years ago

Yes. Thanks for the advice.

martanne commented 3 years ago

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).