Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature request: selected character count #4624

Closed
xJonathanLEI opened this issue Nov 7, 2022 · 6 comments · Fixed by #4682
Closed

Feature request: selected character count #4624

xJonathanLEI opened this issue Nov 7, 2022 · 6 comments · Fixed by #4682
Labels
A-gui Area: Helix gui improvements C-enhancement Category: Improvements E-easy Call for participation: Experience needed to fix: Easy / not much E-good-first-issue Call for participation: Issues suitable for new contributors

Comments

@xJonathanLEI
Copy link
Contributor

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.

@xJonathanLEI xJonathanLEI added the C-enhancement Category: Improvements label Nov 7, 2022
@xJonathanLEI
Copy link
Contributor Author

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.

@kirawi kirawi added E-easy Call for participation: Experience needed to fix: Easy / not much E-good-first-issue Call for participation: Issues suitable for new contributors A-gui Area: Helix gui improvements labels Nov 7, 2022
@Siiiimon
Copy link

Siiiimon commented Nov 9, 2022

Hi all!
I'd like to tackle this issue if that's fine with everyone 😄

@wes-adams
Copy link
Contributor

wes-adams commented Nov 9, 2022

@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: #4682

looking forward to any feedback

@the-mikedavis the-mikedavis linked a pull request Nov 9, 2022 that will close this issue
wes-adams pushed a commit to wes-adams/helix that referenced this issue Nov 9, 2022
@wes-adams
Copy link
Contributor

the linter pointed out my poor coding style

pushed 2nd attempt

wes-adams pushed a commit to wes-adams/helix that referenced this issue Nov 9, 2022
wes-adams pushed a commit to wes-adams/helix that referenced this issue Nov 9, 2022
wes-adams pushed a commit to wes-adams/helix that referenced this issue Nov 9, 2022
wes-adams pushed a commit to wes-adams/helix that referenced this issue Nov 10, 2022
@Siiiimon
Copy link

no worries!

@wes-adams
Copy link
Contributor

wes-adams commented Nov 10, 2022

@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

Screenshot from 2022-11-10 09-41-57

wes-adams pushed a commit to wes-adams/helix that referenced this issue Nov 10, 2022
wes-adams pushed a commit to wes-adams/helix that referenced this issue Nov 11, 2022
wes-adams pushed a commit to wes-adams/helix that referenced this issue Nov 11, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-gui Area: Helix gui improvements C-enhancement Category: Improvements E-easy Call for participation: Experience needed to fix: Easy / not much E-good-first-issue Call for participation: Issues suitable for new contributors
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants