Skip to content

vi mode should NOT use half open ranges in visual mode #126

Description

@mseravalli

The VI mode should not use half open ranges when in visual mode. Vi(m) doesn't do it. It's just confusing. Currently when selecting a whole word, the cursor will end on the next character after the word, which will be highlighted but not selected, this is not a good user experience.

How to reproduce: https://github.com/user-attachments/assets/59e573dd-389d-4678-93a5-3da2511c7284

  1. open https://editor.bitwiser.in/
  2. select: kotlin and vim
  3. press: g g v i w
  4. press: d

The space after the word import although highlighted as part of the selection won't be deleted.

The same key sequence in vim does not highlight a character that is not selected: https://github.com/user-attachments/assets/1284d21b-c894-4163-bd29-e36e04c3c3f5

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions