Mouse-scrolling nano in Terminal.app

1

In the OS X Terminal, we can use the mouse or trackpad to scroll in programs that use the alternate screen, such as less.

This used to be possible in nano as well, both for local sessions as well as ssh'ed into a remote machine.
Scrolling would effectively move the cursor, as if the / keys were used extremely rapidly.
As of OS X 10.10 or 10.11 (not sure which), this no longer works.
It seems that since one of those updates, I am able to position the cursor by clicking, set marks, etc. (i.e. mouse support is enabled and working), but I can no longer scroll.

I know that I can navigate by a whole lot of keyboard commands, but I can scroll a lot faster on my trackpad, and it would also use soft scrolling, as opposed to the whole-page-jumps caused by PgUp/PgDn.

Is there any way I can bring that scrolling functionality back through configuration or either the Terminal or nano?

Siguza

Posted 2016-03-13T22:32:59.347

Reputation: 312

Answers

2

Okay, it's one of those too-simple-to-try things.
You have to disable mouse support.

In .nanorc, write:

unset mouse

Or use EscM to toggle mouse support from within nano.

I hope this saves someone a day of searching.

Siguza

Posted 2016-03-13T22:32:59.347

Reputation: 312

Yes, rather counter-intuitive (disable mouse support to be able to use the mouse to scroll). It seems it's one or the other with Nano. You can have mouse support, which will allow for repositioning the cursor by clicking with the mouse, but with no scrolling; or, you can disable mouse support, which will allow scrolling, but no clicking. Thanks for posting this keyboard shortcut. At long last I can switch between the two options during a Nano session. Very happy. – inspirednz – 2017-10-08T04:09:30.030

Wow. Amazingly counterintuitive... I'd really love to position the cursor by clicking and then scroll down ^^ Thanks for the shortcut here as well – Julian F. Weinert – 2019-06-07T12:35:04.870