gugu138 downloadsPress Ctrl+U to underline the selection. Press again to remove it. Multi-line selections are wrapped line by line.
Ctrl+U to underline. Press it again to take the underline away.
Obsidian gives bold and italic a hotkey but not underline, because Markdown has no underline syntax. The only way is raw HTML:
This sentence has one <u>underlined</u> phrase in it.
Seven characters typed around every phrase, closed every time, forgotten often enough to be irritating. Underliner turns that into a single keystroke, and a toggle.
| You do | You get |
|---|---|
Select important and press Ctrl+U |
<u>important</u> |
| Press it again | important |
Select text that is already inside <u> … </u> |
the tags are removed, no nesting |
Put the cursor inside an empty <u>…</u> pair and press |
the pair is removed |
| Put the cursor inside a word, nothing selected | that word is wrapped (press again to unwrap) |
| Press with the cursor on blank space | <u></u>, cursor between the tags |
| Select several paragraphs | each line wrapped on its own |
Because the naive version breaks on real notes.
<u>…</u> silently breaks the rendering of the paragraph around it. Underliner wraps each line separately and leaves leading whitespace outside the tag, so it keeps working inside list items and blockquotes.<u> pair contained in the selection — and removes it instead of nesting another one.Word detection covers ASCII words (letters, digits, _, -, '). It deliberately skips CJK text: Chinese and Japanese have no spaces, so guessing a word boundary there would wrap the wrong range — you get an empty pair to type into instead.
Submitted and under review. Once it's listed, install it from Settings → Community plugins → Browse.
guguthecoder/obsidian-underliner.main.js and manifest.json from the latest release.<vault>/.obsidian/plugins/underliner/.Ctrl+U (⌘+U on macOS) is bound as a default, so it works the moment the plugin is enabled. If something else claims it, rebind it in Settings → Hotkeys → Underliner: Toggle underline. On mobile, add the command to the editor toolbar in Settings → Mobile.
There are older plugins that write <u> too. If one of them does everything you need, keep it — this isn't meant to replace something that already works.
It exists for the cases those ones get wrong, and which are still open issues in their trackers: the underline doesn't come off when you press the hotkey again, the toggle toggles something unexpected, a multi-line selection renders broken, the cursor inside a word does nothing, or a word at the end of a line is skipped.
<u> tags in your notes, as it should: they're ordinary text, and Obsidian renders them without any plugin.The plugin is a single 4.5 KB main.js with no dependencies, no settings tab, no stylesheet and no build step — open it, edit it, reload Obsidian. Underlining is native HTML, so the rendering is already there; there is nothing to style.
Underliner deliberately does not add a toolbar button, a formatting menu entry, a live-preview decorator, or tags like <center> / <sub> / <sup>. Those are the features that turn five kilobytes into five thousand lines.