How to disable the mouse?

To disable mouse support entirely in Kakoune, add something like this to your kakrc:

set -add global ui_options ncurses_enable_mouse=0

However, if you’re used to mouse-scrolling in MuPDF you may find it frustrating that mouse-scrolling no longer works in Kakoune.

If you’re worried about click-to-focus disturbing your text editor, you may wish to try you window manager’s focus-follows-mouse (“sloppy focus”) mode instead; it’s a lot more convenient to type into different windows if you don’t have to click on them all the time. Alternatively, you could flip between Kakoune and MuPDF with Alt+Tab and never have to touch the mouse at all.

Kakoune doesn’t have a way to undo the last cursor movement. There’s <c-o> to undo the last cursor jump, but that’s only relevant if you accidentally hit something like gg, not x.

Your TeX files don’t need to have long lines, semantic line breaks should work perfectly well there.