News for hackers. Stuff that matters.
Re:Write thin to write fast by telotortium on Wednesday November 10, 2021 @02:37AM (#29172083)
It would be cool if you could automatically do this in a browser, by essentially telling the browser to render a very long screen and then split it into however many columns fit on your screen (imagine taking a screenshot of your window, going down a page, taking another screenshot, and so on, and then putting these screenshots side by side).

Questions:

- Are there Ebook readers that can show many pages at once?

- Can you get this effect in an editor (Emacs/Vim/VSCode) so that you can review a long code file without scrolling too much?

Re:Write thin to write fast by telotortium on Thursday November 11, 2021 @10:19PM (#29196006)
I found out that the author of this article wrote it using a markup language called (confusingly) Scroll: https://scroll.pub/. I'm not sure I want to bother learning another markup language when there are many extensions to Markdown already, but this author apparently favors the multi-column layout.

I find scrolling all the way to the bottom of a thin column to get old fast, however, especially when the article is longer than can fit into a single page.

It's pretty easy to constrain the height of the article text div element to be slightly less than screen height (using `height: 100vh`, or maybe slightly smaller if you have a header), which makes the columns fit vertically within the screen but causes more columns to appear off-screen to the right. However, you can override PageUp and PageDown to scroll left and right instead: https://github.com/publicdomaincompany/scroll/issues/10#issu....

That's pretty satisfying if you like to read in thin columns - almost like a poor man's PDF but completely in HTML.

Re:Write thin to write fast by telotortium on Wednesday November 10, 2021 @08:23PM (#29183340)
Update: I've managed to get at least part of this working by combining Emacs' built-in follow-mode with the built-in (I believe) eww browser, creating a multi-column browser. Here it is showing the GNU Emacs Wikipedia page: https://i.redd.it/t9joft2nbvy71.png
Re:Write thin to write fast by y4mi on Wednesday November 10, 2021 @02:50AM (#29172152)
thats actually super easy if i didn't misunderstand you

    .col-style {
        columns: 250px;
        height: 100vh;
    }
    <div classes="col-style"><p> everything in here will be in columns of 250px width and the scroll bar will be going to the right instead of the bottom</p></div>
try it out on the linked articles <body> element :) (you'll also have to remove the margins on that page however, as they're using negative values)
Re:Write thin to write fast by carl-erwin on Wednesday November 10, 2021 @03:31AM (#29172409)
Hi,

In Emacs, it is possible by using "follow-mode":

Open a "large" file.

M-x follow-mode

C-x 3 ;; to split vertically

And adjust splits width as many times needed.

I usually use 3 splits with "visual-line-mode" enabled.

Re:Write thin to write fast by telotortium on Wednesday November 10, 2021 @03:30PM (#29180283)
Yeah, I tried that out. It works pretty well, except that it's not always obvious how the files relate to each other at a glance - I tried it out on an Org-mode file with a lot of small headlines, so that made it more difficult. It would be nice to see in my modeline which window shows which part of the file.
Re:Write thin to write fast by gauchojs on Wednesday November 10, 2021 @04:26AM (#29172732)
VsCode: a single thin column is possible: turn on Zen Mode, word Wrap, and slide the bar for a thin editor.
Re:Write thin to write fast by telotortium on Wednesday November 10, 2021 @08:23PM (#29183343)
Thanks, but I feel that the benefit of thin columns only really comes when you can keep many of them on the page at once.