Refactoring one line links into wikilinks ========================================= Previously I had setup a feature of my website to expand one line links into a card. This was not a standard, even to the point that some formatters wrap the... Date: May 31, 2024 Previously I had setup a feature of my website to expand one line links into a card. This was not a standard, even to the point that some formatters wrap the links with , thus breaking my custom plugin. Moving to the wikilink standard will allow my markdown posts to work accross more site builders without custom integrations. Expand One Line Links [1] ## What is a wikilink Wikilinks are standard to a lot of wikis written in markdown. [markdown-it-wikilinks](https://github.com/jsepia/markdown-it-wikilinks#readme){.hoverlink} The wikilink syntax is a slug wrapped in double square brackets. ``` markdown [[ slug ]] ``` Marksman lsp will even autocomplete these for you, its pretty sweet. !!! Note I recently implemented hover for wikilinks and and am pretty stoked about the result. Check this one out sick wikilink hover [2]. ## Vim Quickfix You could use `vimgrep` to fill your quickfix list will all of the one line links but I am less familiar with vimgrep and kept missing posts for some reason, I think it was something in my file glob missing some directories. I chose to use `cexpr` to fill my quickfix list using a command that outputs a vimgrep format `filename:line:col:msg` ``` vim :cexpr system('rg ^