How to get relative line numbers on wrapped lines in Obsidian
Obsidian's own line numbers give a wrapped paragraph one number, and its Settings help page lists no relative numbers, as of October 2026. Free plugins add relative numbers, but they count lines, so a counted gj won't match the gutter. To number each wrapped row you need Visual Line Numbers, or you keep counted moves on whole lines.
Updated · 4 ways compared · 16 sources
Background
The forum request Relative line numbers dates from 27 May 2020. It has 56 likes and 14 posts, and a poster linked the Relative Line Numbers plugin there in January 2021.
Wrapped lines came next. The GitHub request Numbering Visual Lines has been open on that plugin since March 2023, with 39 reactions and 3 comments. In May 2025 a commenter wrote that counted moves break across paragraphs once j and k mean gj and gk. A request on Vimrc Support from January 2022 describes the same mismatch.
4 ways to do it
Core line numbers and Vim key bindings
Settings, Editor has Show line numbers, which shows line numbers in the gutter. The same page has Vim key bindings under Advanced.
A forum reply from August 2021 explains what you see with line wrap on. Your lines are the paragraphs, so one number covers a whole wrapped paragraph.
limits
The Settings help page lists no relative numbers and no option for wrapped rows. Plain j and k move by whole paragraphs when lines wrap.
Relative Line Numbers is the most used one, with about 113,000 downloads in the community directory. Its README asks you to keep Show line numbers on. Its directory page says the last update was 3 years ago.
Hybrid Line Numbers is newer, with an update on 9 October 2026. It has hybrid, relative and absolute modes, and a folded section counts as one line. With plain j and k, the number beside a line is the count that reaches it.
limits
Both count lines, not wrapped rows, and neither README names an option for wrapped rows. Map j to gj and the numbers stop matching your counts.
Vimrc Support loads Vim commands from a file in your vault. Its README maps j and k to gj and gk, so single steps follow the rows you see. Better Vim lists the same remap as an optional setting.
A commenter on Vimrc Support issue 81 adds two lines, noremap J j and noremap K k. Counted moves with J and K then go by whole lines, and a relative line number plugin shows those counts.
limits
The mapping takes over the J and K keys. The plugin author wrote there that the count-aware mapping from Vim is beyond Obsidian's Vim emulation.
Visual Line Numbers draws its own gutter and puts a number on every display row. In relative and hybrid mode the numbers count rows from the cursor. So with j mapped to gj, 5j lands on the row that shows 5.
The gutter, the three modes and the commands are free. Counting folded lines, a per-note off switch, the current row highlight, the motion hint and mode colors need Pro.
limits
With the cursor off screen, the relative numbers are close but not exact. The gutter shows in Live Preview and Source mode, and you turn off the core line numbers yourself.
Install Visual Line Numbers from Community plugins and enable it. It needs Obsidian 1.13.4 or later.
Open Settings, Editor and turn off Show line numbers. Two gutters of numbers would show together.
Open a note in Live Preview or Source mode. Relative mode is the default, so the cursor row shows 0.
Turn on Vim key bindings in Settings, Editor.
Map j and k to gj and gk. With Vimrc Support, add nmap j gj and nmap k gk to your vimrc file.
Type a count from the gutter, for example 5j. The cursor lands on the row that showed 5.
Common questions
Why doesn't a counted j land on the row I expect?
Check your mapping first. If j is mapped to gj, a count moves by display rows, while a line number plugin counts whole lines. Keep counted moves on whole lines, or use a gutter that numbers rows.
Does Vim Motions number wrapped rows?
Not as of October 2026. Its README lists a line number gutter with absolute, relative and hybrid modes. Its known limitations file says the status column has no v:virtnum for wrapped lines.
Is there a CSS snippet that numbers wrapped rows?
A forum search in October 2026 found none. Visual Line Numbers doesn't count with CSS. It asks the editor where each display row of a line ends, and only for the lines on screen.
How do folded sections count?
Hybrid Line Numbers counts a folded section as one line, and its README says Vim counts a jump that way. Visual Line Numbers does the same by default, because a fold is drawn as one row. Its Pro option Count folded lines counts each hidden line instead.
Right-click the heading and choose Rename this heading. Obsidian then updates every link to that heading. If you just type over the heading text, the links keep the old text, as of October 2026, unless a community plugin updates them.
The core Outline can't show them, as of October 2026. The help page says Outline lists the headings in the active note, and forum posts up to January 2026 confirm embeds add none. People get by with a heading above each embed, a symbol list in a switcher, or a second outline panel from a plugin.