Currently Geany already provides one long line marker, which I find extremely helpful.
I find it so useful, in fact, I can think of a few situations where I could use an extra one.
Primarily -- Python's PEP 8 recommends 72 characters for docstrings, though the real code's line limit is longer.
Additionally -- Others may be working in heavily indented code and could use a vertical indicator for some specific nesting level, to help keep their place.
So if possible, I'd love the ability to set two separate long line markers of different colors in settings. (The second one would be turned off by default of course), just so I can watch one column for comments and the other for code.
Thanks for the project, it's been a huge help!
This can be done with the [GeanyLua](https://plugins.geany.org/geanylua/) plugin. Here is a script that implements the feature: [column-markers](https://github.com/xiota/geanylua-scripts/tree/main/column-markers). You can add as many column markers as you like.
The script sends messages to scintilla: ```lua -- set multiple column marker mode geany.scintilla ("SCI_SETEDGEMODE", 3, 3)
-- clear current markers geany.scintilla ("SCI_MULTIEDGECLEARALL", 0, 0)
-- add new column markers, colors are in BGR order geany.scintilla ("SCI_MULTIEDGEADDLINE", 60, 0xe5e5e5) geany.scintilla ("SCI_MULTIEDGEADDLINE", 72, 0xf0c098) -- blue geany.scintilla ("SCI_MULTIEDGEADDLINE", 80, 0xdd8add) -- purple geany.scintilla ("SCI_MULTIEDGEADDLINE", 88, 0xe5e5e5) geany.scintilla ("SCI_MULTIEDGEADDLINE", 96, 0x5161f6) -- red ```
Each document maintains it's own set of markers, and new documents are created with the default Geany marker. So the script needs to be run for each document. This can be done by editing [event scripts](https://plugins.geany.org/geanylua/geanylua-intro.html) located at `~/.config/geany/plugins/geanylua/events`. I've found that `activated.lua` is currently the best script to use for this. To apply the setting to documents when Geany is first started requires signals that GeanyLua doesn't currently handle ([geany-plugins#1112](https://github.com/geany/geany-plugins/pull/1112)).
github-comments@lists.geany.org