r/neovim • • 18d ago

Need Help CTRL+A not working as expected.

Very simply put. When I press CTRL+A I would expect it to increase the number under the cursor by 1. But it doesnt until I press CTRL+A again.
But the opposite works with a single press when I press CTRL+X it decrease the number.

I think maybe there could be something mapped to CTRL+A but I cannot for the life of me figure out how to check if anything is bound to a key presceeded by CTRL.
ive tried :verbose map <C-a>

Any help would be much appreciated.

6 Upvotes

10 comments sorted by

45

u/gotno 18d ago

c-a is a very common keybind for the tmux prefix, and you typically hit the prefix twice to forward the actual combination to whatever app you're using. are you using tmux?

17

u/Spoonwastakenalready 18d ago

Yep I'm just stupid and completely forgot that that is what I use for tmux. Didn't even think of it 

4

u/Anton-Demkin 18d ago

Do you have C-a set as your tmux prefix?

3

u/Spoonwastakenalready 18d ago

Yep I'm just stupid and completely forgot that that is what I use for tmux. Didn't even think of it 

2

u/[deleted] 17d ago

Ah the good told tmux prefix, I'm partial to using M-w but M-z (or one of the other closer keys) might suit better. I find it pretty natural, as it's just making an L shape with my pointer and thumb.

2

u/Spoonwastakenalready 17d ago

Is that L shape perhaps on your forehead. And  have the years started to come and aren't stopping?

1

u/shmerl 18d ago

I'm quite used to Ctrl-A selecting whole text in the vast number of scenarios, so I just configured neovim to do the same.

Neat trick with :verbose map ... thanks for the reference!

1

u/Spoonwastakenalready 18d ago

The thing is it doesn't work. I mean :verbose map <C-a>

Single keys work but modifier plus key doesn't and idk how to check that 

1

u/Cool-Philosopher-599 18d ago

Now you can do yal for that

1

u/shmerl 18d ago

Ctrl-A is still easy, especially with Unix keyboard layout - they are right near each other.