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

Relative line numbers #2

Closed
Opisek opened this issue Jul 21, 2023 · 3 comments
Closed

Relative line numbers #2

Opisek opened this issue Jul 21, 2023 · 3 comments

Comments

@Opisek
Copy link

Opisek commented Jul 21, 2023

Would it be possible to add an option to make the line numbers relative? Assuming In the following example that I'm at line 5, it would look like this:

1 Example
2
3 Normal line numbers
4
5 I'm here right now
6
7
  4 Example
  3
  2 Relative line numbers
  1
5   I'm here right now
  1
  2

If you feel like this would be a nice addition but prefer not to implement it yourself, I could look into opening a pull request.

@FelisDiligens
Copy link
Owner

Joplin uses CodeMirror 5. (5.65.9)
There's a closed issue with relevant code, that I found here: codemirror/codemirror5#4116
Perhaps we could start with that? I'm busy at the moment, so if you want to take a shot at it, I'd be happy to merge a PR.

@FelisDiligens
Copy link
Owner

I added relative line numbers in v1.1.0


@Opisek
Copy link
Author

Opisek commented Aug 1, 2023

Works great, thanks a lot!

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

No branches or pull requests

2 participants