0

On my MacBook (Monterey 12.3.1), I recently switched from the standard terminal to iterm2. However, I noticed some strange behavior when using vim in the new terminal. If I scrolled to the top of the file using the mouse, not only did my cursor remain in its current position but I was able to scroll beyond the beginning of the file into the terminal output.

With the standard terminal, the cursor moved with my mouse scroll and it stopped when it reached the beginning of the file. Is there a way to attain this behavior with iterm2?

4
  • iTerm has assigned the mouse event to scrolling the terminal window vs a pass-through to vim to scroll the application. There's probably a configuration option for it, but was there some reason to switch to iTerm in the first place? May 1, 2022 at 16:36
  • At the moment, I'm just trying it out. May 1, 2022 at 16:37
  • If you are scrolling using scroll bar in built-in Terminal you should be able to observe exactly the same behavior May 1, 2022 at 20:46
  • See stackoverflow.com/a/32103959/1436129 if you are having scrolling issues in Vim + iTerm2 - For me it turned out that I had accidentally disabled the Mouse Reporting feature.
    – aubreypwd
    Oct 26, 2022 at 17:27

1 Answer 1

1

I had the same problem and what worked for me is changing a setting in iTerm2. Navigate to Settings > Advanced and then change the option Scroll wheel sends arrow keys when in alternate screen mode to Yes.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .