1

How to let the cursor push the screen instead of the the screen drag the cursor when scrolling with the mouse?

I switched to iterm 2 on osx, but in the regular osx 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.

EDIT:

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 Sep 7 '15 at 17:33
  • @statox tried to clarify. Thanks for the hint though – user108589 Sep 8 '15 at 6:42
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 Sep 8 '15 at 12:54

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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