0

I recently made a bunch of changes to my vim configs and I later noticed that the enter/<CR> behavior on normal mode has changed. I used to be able to select and execute a line in the command line window (:q) by selecting it and hitting enter. I believe this to be the default behavior.

But now, when I hit enter, it instead scrolls down by half a screen in both the command window and other buffer windows. I checked my key mappings (:map, :nmap, :nnoremap, etc) but I couldn't find anything setting a mapping for <CR> in normal or any other mode.

How can I figure out what is going on and restore the default behavior?

1 Answer 1

0

Ok, I think I figured it out. With the help of vim --clean and :h CR I was able to verify that my old behavior is indeed what the default is. In :h CR I noticed that C-M by default maps to the same behavior. And I recently remapped C-M to scroll a have page. So I deleted that mapping and indeed, I got my default behavior back.

I just need to figure out now how I can remap C-M without also changing CR behavior.

3

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.