Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

Whatever terminal-emulation app (e.g., Gnome Terminal) you are using will allow you to select text in the app's window, but nano or vim will never know about it. I.e., the user's mouse gestures are never transmitted to the program (e.g., nano) on the other side of the pseudo-TTY (PTY).

So for example, the user cannot use the mouse to move the insertion point in nano.



> So for example, the user cannot use the mouse to move the insertion point in nano.

That is not the case if you enable mouse support, as I've said.

Try it. Add:

    set mouse
To ~/.nanorc

Open a file, and click. The insertion point will move.


Oh, OK. Good to know. Thanks for your reply. vim, too?


The vim command needed to enable support is:

    set mouse=a
But yes, it works basically the same.




Consider applying for YC's Summer 2026 batch! Applications are open till May 4

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: