https://github.com/endlessreform/obsidian-relative-line-numbers
Obsidian relative line numbers extension for CodeMirror 6
https://github.com/endlessreform/obsidian-relative-line-numbers
Last synced: 3 months ago
JSON representation
Obsidian relative line numbers extension for CodeMirror 6
- Host: GitHub
- URL: https://github.com/endlessreform/obsidian-relative-line-numbers
- Owner: EndlessReform
- License: mit
- Created: 2022-02-03T22:16:54.000Z (over 3 years ago)
- Default Branch: master
- Last Pushed: 2022-02-04T00:24:12.000Z (over 3 years ago)
- Last Synced: 2025-01-16T01:14:40.364Z (4 months ago)
- Language: JavaScript
- Size: 102 KB
- Stars: 2
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Relative Line Numbers in Live Preview

This [Obsidian](https://obsidian.md/) plugin enables relative line numbers in Obsidian's Live Preview mode(Obsidian v13+).
To use this plugin,
- Line numbers must be enabled (`Options/Show Line Number`)
- Legacy (CM5) editor must not be enabled (use Nadav Spiegelman's [obsidian-relative-line-numbers](https://github.com/nadavspi/obsidian-relative-line-numbers) for CM5)Under the hood, this plugin simply adds jsjoeio's [codemirror-line-numbers-relative](https://github.com/jsjoeio/codemirror-line-numbers-relative) extension to the editor and tweaks CSS to minimize reflow.
## Known issues
Vim treats Mermaid code blocks and $\LaTeX$ blocks as a single line number, while the gutter counts the actual plaintext lines behind the block. Relative line numbers over or under these blocks will not be accurate.