confuserdotcom27 downloadsZathura's keys in the PDF view: J/K pages, gg/G, zoom, marks, search, dark recolor, a status bar and last-page memory.
Read PDFs in Obsidian like it's zathura.
J K gg G, dark recolor, marks, a status bar and a study split, all without the mouse.
Keys · Commands · Settings · Install
Zathura's keys in Obsidian's PDF view: read a book without touching the mouse. Also a dark recolor, a status bar, marks, last-page memory, and a study split that puts the PDF next to your notes.
▶ Watch the full-quality video
In a PDF tab, with the page focused:
| Keys | What they do |
|---|---|
J K |
next / previous page |
j k ↓ ↑ |
scroll |
d u Ctrl-d Ctrl-u |
half a page down / up |
h l Ctrl-h Ctrl-l ← → |
scroll sideways |
gg G {n}G {n}gg |
first page, bottom, page n |
z = + / Z - |
zoom in / out |
W Ctrl-0 / H |
fit width / fit page |
D |
dual page |
r |
rotate |
i |
recolor: dark pages, colours keep their hue |
b |
status bar on / off |
Tab T |
table of contents |
/ then Enter, n N |
search (Enter goes back to the page), next, previous |
m{x} '{x} |
set a mark / go back to it (per file) |
R |
reload |
Esc |
drop a count |
Counts work like in zathura: 3J, 5j, 12G. Keys typed in a note, a search box or a dialog are left alone.
file [page/pages] percent, at the bottom of each PDF.Bind them to hotkeys (or vimrc maps, see below):
Ctrl-^; when that tab was closed, reopens the last file of the other kind.[[book.pdf#page=12]] opens page 12), the quick switcher. Arguments take {file} and {page}; for zathura, --page={page} {file}. It is turned on per device with the command above, so a desktop can open zathura while a laptop keeps Obsidian's view.The recolor and the status bar can be restyled in a CSS snippet:
body { --pz-recolor-bg: #1e1e2e; --pz-status-bg: #181825; --pz-status-fg: #cdd6f4; }
The body gets classes for your own snippets too: pz-study (a PDF is on screen), pz-split (next to a note), pz-pdf-active (the PDF has focus).
The keys work on their own; no Vim mode needed. With Obsidian's Vim mode on, the editor keeps its own keys: these only act while a PDF has focus.
With Vim Motions, its leader sequences (Space f f…) still work from a PDF, and a bare g goes to it (gg, gt, gT). Leader maps for the commands:
nnoremap <leader>p :obcommand pdf-zathura:study-split<CR>
nnoremap <leader>ba :obcommand pdf-zathura:alternate<CR>
Until it is in the community plugins list, either:
confuserdotcom/obsidian-pdf-zathura, ormain.js, manifest.json and styles.css from the latest release into <vault>/.obsidian/plugins/pdf-zathura/, then enable PDF Zathura Keys in Settings → Community plugins.Desktop only.
No build step: main.js is the plugin.
npm test # unit tests: every key on a fake PDF view, settings, external program arguments
node e2e-isolated.mjs # real key presses in a separate Obsidian with a throwaway vault and tools/sample.pdf (macOS)
The plugin is free and stays free. If it saves you time, you can support it here.
If it saves you a trip to the mouse, a ⭐ on GitHub helps other Obsidian users find it.
Bugs and ideas: open an issue.