Kakoune-typewriter: move the screen, not the cursor

Do you miss the days of tapping out text on a typewriter, watching the page slide slowly to the left as you typed, then zinging back to the right for each new line? Well, do I have the Kakoune plugin for you!

asciicast

The other day I came across a post on r/badUIbattles depicting a text editor that moved its window across the screen as the user typed, like the page in a typewriter. It was cute, I grinned then closed the tab, but afterward I kept wondering if I could do the same thing in Kakoune, possibly by adding very wide line-specs highlighter to push the buffer away from the left edge of the terminal. It turns out, yes! It can be done.

In the screen recording above, you can also see my previous “joke” plugin which I’m inexplicably still using, my Qbasic colorscheme, as well as a hacked version of non-joke plugin scrollbar.kak.

9 Likes