Hi - not sure how to describe this problem super easily, so I haven’t been able to search for a good solution on the internet.
On JetBrains IDEs I’ve used in the past, there’s a vertical line that serves as a guideline for how long a line should be. Here’s it pointed out on a random screenshot from the web:
Is there any way for me to do something similar in Kakoune? I’m writing Markdown documentation and that kind of thing is super useful to not let lines get too long, but I also don’t want to go just off screen width since that sort of thing is variable.
Highlighting a column is the usual way to proceed in terminal-based editors. An alternative (which I find more pleasing) is to highlight a series of columns to create a colored pane on the right. For example:
Doing so requires looping over a set of column indices. Usually you would need to shell out for the loop, but here is an alternative without shell calls. The script makes uses of almr’s looping techniques:
After having sourced the script (or after copying it somewhere in your autoload directory), you will be able to create a colored pane with the divider-on <column> command. The column parameter is the column where you want the colored pane to start (e.g., 81). Pane color can be customized via the divider_face option.
Almost worked for me! I was running into issues where it was trying to delete a nonexistent highlighter (window/divider) when i ran divider-on and so I had to tweak the script slightly:
define-command -params 1 -docstring 'divider-on <column>: colorize right side starting from column' \
divider-on %{
add-highlighter -override window/divider group
set-option window divider_column %arg(1)
divider-do-256 divider-colorize
} -override