Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

c in visual mode doesn’t change the selection #33

Open
dnaq opened this issue Jul 6, 2024 · 4 comments
Open

c in visual mode doesn’t change the selection #33

dnaq opened this issue Jul 6, 2024 · 4 comments
Labels
keybindings VIM keybindings

Comments

@dnaq
Copy link

dnaq commented Jul 6, 2024

Summary

Selecting a word in visual mode and then hitting c does not immediately delete the selection and switch to insert mode, instead it acts like c in normal mode, waiting for a movement to be entered.

Reproduction Steps

I tried this:

  1. hx
  2. Select any word in visual mode
  3. Hit c

I expected this to happen:

That the selection immediately be deleted, and the mode switched to insert mode.

Instead, this happened:

The c command from normal mode

Helix log

No response

Platform

Linux

Terminal Emulator

tmux

Installation Method

flake

Helix Version

2dc286a

@usagi-flow
Copy link
Owner

Thank you for reporting this issue. I did not manage to reproduce it, however. c in visual mode immediately clears the selection and switches to insert mode. I did try it in a few different environments and on nix-darwin, but didn't notice anything unusual.

I haven't tried it with the flake though, I wonder if you're getting upstream helix binaries from cachix...

Mind checking if the problem persists with a different installation method? Maybe nix-shell -p evil-helix if you have an up-to-date unstable channel?

@dnaq
Copy link
Author

dnaq commented Jul 10, 2024

Sorry for that, my bug report was lacking detail. This only seems to happen when making a selection using helix quickjump feature (gw), so selecting a word with gw and then pressing c seems to reproduce the issue.

@usagi-flow
Copy link
Owner

usagi-flow commented Jul 10, 2024

Oh, I see now; when you initiate a jump while in normal mode, it'll perform a selection, but stay in normal mode, which in turn results in the behavior you described. I'll have to vimify gw.

@usagi-flow usagi-flow added the keybindings VIM keybindings label Jul 10, 2024
@mmoya
Copy link

mmoya commented Jan 13, 2025

Same thing happens when using object motion to select:

For example, text is:

word1 'word2' word3

And I want to change word2 inside the quotes.

The c works after selecting with vw but doesn't work after selecting with mi'.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
keybindings VIM keybindings
Projects
None yet
Development

No branches or pull requests

3 participants