I like to use ctrl+a in vim to increase numbers. I recently upgraded my mac to Calelina, and the ctrl+a command no longer works in vim. The strange thing is, when I ssh to different linux machines, I notices ctrl+a does work in vim. How can I make ctrl+a increase numbers on my mac? Right now, when I highlight a number with the vim cursor and press ctrl+a, nothing happens.
Asked
Active
Viewed 24 times
0
1 Answers
2
When a shortcut does not behave as intended, it's often due to a mapping. To check it, you can use:
:verb nmap <c-a>
:h :mapwith zero or one argument: list mappings:h :verbose: show more info, in this case, the script, line and column where the mapping is set
If the problem is not related to a mapping, you should read How do I debug my vimrc file. It mentions quite a few tips, namely vim --clean (one way to start vim without user configuration) is explained and debated.
Biggybi
- 2,740
- 9
- 29
vim --clean? If so, you should debug your vimrc (:verb map <c-a>would be a start). – Biggybi Jul 06 '22 at 09:06vim --clean, but I didn't understand why until I ran:verb map <c-a>. It turned out I had installed a vim bundle a while ago I forgot about. After removing the bundle, ctrl+a increases numbers again. I think you should make this comment into an answer. – kilojoules Jul 06 '22 at 11:07