Poor man's distraction-free writing

Replying to these two questions:

these 4 lines of code give you an ersatz of distraction-free typing mode:

set-face window LineNumbers black
set-face window LineNumberCursor black
set-option window modelinefmt ''
add-highlighter window/free number-lines -min-digits 10 -separator '          '

The first 3 lines hide or remove information we don’t want. The last line creates a left margin of 20 blank chars (both -min-digits and -separator string length are limited to 10 bytes). The amount you want depends on your usual terminal window width.

This a far cry from vim’s goyo or similar plugins (which make space on each side of the writing space by creating, then hiding, window splits), but here you go.

Screenshot:

1 Like