Automatically break text when reaching a specific number of columns

Use case or problem

I’m a long time vim editor user but I keep my daily work on Obsidian. Every week I copy my journal from Obsidian to vim, edit it a bit and send by email. By editing I mean that I adjust the line lenghts to fit into 80 columns, since people where I work usually read mails on terminal (using mutt or alpine) and so 80 columns text breaks is what people here.

Proposed solution

It would be great if there was a configuration to specify that, when reaching a number of text columns it would break to the next line automatically.

1 Like

Moved to plugin ideas.

Maybe a plugin to mark a specific column, like vim can do too, would be great, so the user knows when to break to a new line.

I might try to build this, the only problem Im thinking of is that headers would have fewer columns than regular text per line because the characters are bigger.

Adding a css snippet similar to this could be a quick fix:

.cm-line {
  width: 200px;
  word-wrap: break-word;
}

You would have to play around with the width to get the column width your looking for though.

I would say you should not consider text style. As far as I know, column on vim is a visible char. Therefore, the copied text should not consider the size of the text in the preview mode. Only on the editor mode (where no text style is applied)

As @jvanz mentioned, it would be a visible line marking the end column, or at least it should break the text automatically, and not just “show” it being in the next line when the text itself isn’t. It would be something like the attached image: