[^1] footnote syntax support to VS Code's Markdown editor and preview.
This repository is a maintained fork of houkanshan/vscode-markdown-footnote by Mai Hou. The upstream work was distributed under the MIT License; its original copyright and permission notice are retained in
LICENSE-base. This fork and its modifications are distributed under the GNU Affero General Public License version 3 or, at your option, any later version; seeLICENSE.
-
Hover to preview and jump between footnote reference and content by cmd / ctrl + click.
-
Peek editor for quick editing and preview.
-
Command for inserting new footnote
-
Edit footnotes in a synchronized side editor. Run Open Footnote Editor to keep the current Markdown file's footnotes open beside your draft. Inserting a new footnote keeps the Markdown cursor at the reference and moves focus directly to the new footnote in the side editor. The side editor remembers its scroll/cursor position, and new definitions are placed beside the last footnote you were editing instead of always being appended to the end. Multiline footnote content is supported, including indented continuation lines, as originally requested in upstream PR #14.
-
Optionally store footnote definitions in a separate sibling file. Enable
vscode-markdown-footnote.separateFootnoteFileto keep references such as[^1]in the source document while definitions are read from and written tofootnotes.md. The definition file is created automatically when a footnote is first inserted.vscode-markdown-footnote.footnoteFileNamecan change the file name. Hover, go-to-definition, reference lookup, clickable links, and the synchronized side editor follow the definitions across files. -
Render footnotes in the built-in markdown preview.
Separate-file storage is opt-in and defaults to off, so existing Markdown documents keep their current same-file behavior. VS Code's built-in Markdown preview only receives the source document text, so external definitions are not currently merged into preview rendering; editor navigation and the Footnotes side editor do resolve them.
- Support
pandoc-citeprocformat citations
This fork does not need to be published to the VS Code Marketplace. You can run it directly from the source checkout while developing, or package it as a local .vsix and install it into your normal VS Code profile.
Install:
- Visual Studio Code
- Git
- Node.js with npm
git clone https://github.com/pony-factor/moondancer-FN.git
cd moondancer-FN
npm installnpx tsc -p .The compiled JavaScript is written to the out/ directory.
Open the repository in VS Code:
code .Then press F5, or open Run and Debug and choose Run Extension.
VS Code will compile the extension and open a separate Extension Development Host window with this checkout loaded. You can test the extension there without installing or publishing anything.
After changing the source, stop the development host and press F5 again to rebuild and relaunch it.
Package the current checkout as a local VS Code extension:
npx vsce package --out markdown-footnote-local.vsixInstall that file:
code --install-extension markdown-footnote-local.vsix --forceIf the code command is not available in your shell, open VS Code, go to the Extensions view, open the ... menu, choose Install from VSIX..., and select markdown-footnote-local.vsix.
Reload VS Code after installation if prompted.
To replace the locally installed copy with a new build:
npx tsc -p .
npx vsce package --out markdown-footnote-local.vsix
code --install-extension markdown-footnote-local.vsix --forceNo Marketplace publishing step is required.
- File bugs and feature requests in GitHub Issues.
- Fork this repository
npm install- Create your feature branch:
git checkout -b my-new-feature - Make changes and add tests
npm run test:watchand check your changes by pressingF5- Commit your changes:
git commit -am 'feat: Add some feature' - Push to the branch:
git push origin my-new-feature - Submit a pull request
This fork is licensed under the GNU Affero General Public License v3.0 or later.
The upstream code by Mai Hou was originally distributed under the MIT License. Its original copyright and permission notice are preserved in LICENSE-base.
See changelog here.






