When scrolling with the mouse, how do I make the cursor push the screen instead of the screen drag the cursor?

I switched to iTerm 2 on macOS, but in the regular macOS terminal when I scroll the scrolling moves the cursor not the window. In iTerm 2 it only scrolls the window. I can't find the setting to set this back again. I found set mouse=a but this doesn't do the trick.

To clarify I do not want a scroll offset. I want the physical scroll action to move the cursor not the screen.

  • I'm not sure I understood clearly what you want but maybe the option scrolloff is what you're looking for: if you set scrolloff=10 you will always have 10 lines between your cursor and the bottom of the window when you scroll down, is that what you're talking about?
    – statox
    Commented Sep 7, 2015 at 17:33
  • @statox tried to clarify. Thanks for the hint though
    – user108589
    Commented Sep 8, 2015 at 6:42

1 Answer 1


How about

nnoremap <ScrollWheelUp> k
nnoremap <ScrollWheelDown> j

? I can't test on osx though, but it works on my linux installation.

  • Brilliantly simple love it.
    – user108589
    Commented Sep 8, 2015 at 12:54

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.