Skip to content

Added switchable relative line numbers #432

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

Closed
wants to merge 4 commits into from

Conversation

hidden-being
Copy link

This request enabled the disabling of line numbers in the menu,
and switching row numbering to relative mode.

@lhecker
Copy link
Member

lhecker commented Jun 5, 2025

I'm not sure if this is something we'd want just yet.

Edit: I have to say that I understand how this is helpful for vim. Its commands often take line number parameters (e.g. d7d to delete 7 lines). But this editor is always in visual mode, so I feel like this feature may be a bit too niche, given our focus on minimalism.

@ddad431
Copy link

ddad431 commented Jun 11, 2025

A little opinion. Relative line numbers is not useful. In Vim, you can achieve this by combining visual mode with search, and it is more flexible.

Back to the topic, I think this PR can be split into two: (just my thoughts, feel free to ignore)

  1. Added options to disable line number (Line numbers are not necessary.)
  2. Combine select with search.
    • When text is selected and a search is performed, enable the combination mode.
    • Navigate to selected item, selecting all rows from the initial row to the row of the selected item.

@lhecker
Copy link
Member

lhecker commented Jun 11, 2025

I'm not sure we would want such more advanced navigation features either. The main appeal of this editor is its simplicity, and if we made it into "yet another emacs" it would lose that aspect.

@ddad431
Copy link

ddad431 commented Jun 11, 2025

I'm not sure we would want such more advanced navigation features either. The main appeal of this editor is its simplicity, and if we made it into "yet another emacs" it would lose that aspect.

This is just a random thought, and I'm only sharing a bit of my experience with using vim. There is no intention to complicate the issue or add to the maintainers' workload.

About simplicity, I'm a bit curious why line numbers are displayed by default instead of being an optional feature? I saw #22, I'm a bit concerned that setting line numbers requires a configuration file.

As for this PR, "Add options to disable line numbers" is at least meaningful.

@lhecker
Copy link
Member

lhecker commented Jun 11, 2025

About simplicity, I'm a bit curious why line numbers are displayed by default instead of being an optional feature?

Modern editors universally display line numbers by default. In our case it's also useful because it doubles as a word-wrap indicator.

I'm a bit concerned that setting line numbers requires a configuration file.

It's because disabling line numbers every single time you open the editor would kind of suck. So being able to persist settings like that would be helpful.

@lhecker
Copy link
Member

lhecker commented Jun 17, 2025

I'll close this PR for now, according to the reasoning I wrote above. I apologize for this.

@lhecker lhecker closed this Jun 17, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants