Read Wikipedia articles in NeoVim as if they were man pages.
Requires NeoVim 0.10+ and curl.
:Wiki Python (programming language)
Tab-completion suggests article titles as you type. Inside an article buffer:
qcloses the windowKon a highlighted link jumps to its exact target article; on plain text it looks up the word under the cursorKin visual mode opens the article for the selection
With lazy.nvim:
{ "pjinhispjs/wikiman.nvim" }No setup() call is required. To change defaults:
require("wikiman").setup({
lang = "en", -- Wikipedia language subdomain
open = "split", -- "split" | "vsplit" | "tab"
width = 78, -- text width of the rendered article
})Articles are fetched as rendered HTML from the MediaWiki API (action=parse)
with curl via vim.system(), parsed by a small built-in HTML reader, and
rendered into a read-only scratch buffer with man-page conventions: uppercased
section headings, indented body text, and a NAME(WIKI) header. Title
completion uses the opensearch API.
- Tables render as box-drawing grids (colspan/rowspan included); infoboxes become key/value lists
- Math formulas are converted from LaTeX into readable text (
1/π,sqrt(163),Σ_(k=0)^∞) - Citations stay inline as
[1]markers, and the references section keeps external URLs in<angle brackets> - Images render as
[image: caption or alt text] - Inline
codeis highlighted, and<pre>blocks (source listings, pseudocode) keep their line structure instead of word-wrapping
Highlight groups, overridable with vim.api.nvim_set_hl:
| Group | Default link | Used for |
|---|---|---|
WikimanMath |
Special |
formulas |
WikimanLink |
Underlined |
links to other articles |
WikimanCode |
String |
inline code and pre blocks |
WikimanCitation |
Comment |
citation markers, image placeholders |
WikimanTableBorder |
Comment |
table borders |
tests/run.sh
Runs headless-nvim E2E tests offline: a stub curl on $PATH serves JSON
fixtures, and the tests drive :Wiki and assert on buffer contents, keymaps,
error handling, and completion.