helix
helix copied to clipboard
Feature request: selected character count
When dealing with hashes (in hex) and big decimal numbers, I frequently find myself selecting the whole thing in vim just to check if the length is correct, thanks to the vim feature that shows how many chars you've selected.
Currently Helix is only able to show the number of selections. It would be nice to also have the option to display the number of characters.
My current workaround is to put my cursor right before the text I'm interested in, then press the desired length followed by l to see if the cursor lands on the last character. It kind of works for my case but not when you want to measure the length of some text.
Hi all! I'd like to tackle this issue if that's fine with everyone 😄
@Siiiimon - sorry. this is my first ever attempt at contributing. i didn't realize that we should claim work before starting.
anyways, i have a starting attempt here: https://github.com/helix-editor/helix/pull/4682
looking forward to any feedback
the linter pointed out my poor coding style
pushed 2nd attempt
no worries!
@Siiiimon - thanks for the feedback - i'll definitely be implementing your suggestions
EDIT: wow, i was really overthinking the question below. i got it all figured out. the solution was simply re-building the project. heh, amazing.
i am stuck on one thing though:
how do i link my new config.toml setting to the actual logic in source?
config.toml
. . .
[editor.statusline]
left = ["mode", "spinner"]
center = ["file-name", "primary-selection-length"]
right = ["diagnostics", "selections", "position", "file-encoding", "file-line-ending", "file-type"]
. . .
> hx
Bad config: unknown variant `primary-selection-length`, expected one of `mode`, `spinner`, `file-name`, `file-encoding`, `file-line-ending`, `file-type`, `diagnostics`, `selections`, `position`, `separator`, `position-percentage`, `total-line-numbers`, `spacer` for key `editor.statusline.center` at line 16 column 1
Press <ENTER> to continue with default config
