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.

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

  1. 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.
  2. A free relative line number plugin

    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.
  3. A vimrc mapping that keeps counts on whole lines

    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.
  4. Visual Line Numbers from this site

    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.
    A note with two wrapped paragraphs, the line number 5 on the cursor row and a distance on every other row.
    Open larger

    MIT · no telemetry · core features free

    All features of Visual Line Numbers

Number wrapped rows with Visual Line Numbers

  1. Install Visual Line Numbers from Community plugins and enable it. It needs Obsidian 1.13.4 or later.

  2. Open Settings, Editor and turn off Show line numbers. Two gutters of numbers would show together.

  3. Open a note in Live Preview or Source mode. Relative mode is the default, so the cursor row shows 0.

  4. Turn on Vim key bindings in Settings, Editor.

  5. Map j and k to gj and gk. With Vimrc Support, add nmap j gj and nmap k gk to your vimrc file.

  6. 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.