-
-
Notifications
You must be signed in to change notification settings - Fork 232
Exporting Files
When sending files to people not invested in Neorg it's nice to be able to use a format
that they use. The core.export module is a backend module providing functionality
to write your own exporter for any given filetype.
All export functionality is provided by the :Neorg export command.
To export the currently opened buffer to another file format, you should use the :Neorg export to-file command.
The command takes the following arguments:
-
path- the path to export to. Examples are:my-file.md,~/output.md. If the second argument is not provided Neorg will try to infer the filetype to convert to through the file extension. -
filetype(optional) - the filetype to export to. Useful if you want to use a non-standard extension, or if the filetype you're using cannot be inferred automatically. Note that this filetype must be a filetype that Neovim itself provides and/or understands, i.e.mdormarkdis not a valid filetype, howevermarkdownis.
Neorg also supports exporting a directory of files: this is where the :Neorg export directory command comes into play.
It takes 3 arguments:
-
directory- the directory to export -
filetype- the filetype to export to -
output-dir(optional) - a custom output directory to use. If not provided will fall back toconfig.public.export_dir(see configuration).
And if you just want to export a snippet from a single document, you can use :Neorg export to-clipboard <filetype>. Filetype is required, at the time of writing the only option is "markdown".
This copies the range given to the command to the + register.
-
core.integrations.treesitter- A module designed to integrate Treesitter into Neorg.
core.autocommandscore.clipboardcore.clipboard.code-blockscore.completioncore.concealercore.defaultscore.dirmancore.dirman.utilscore.esupports.hopcore.esupports.indentcore.esupports.metagencore.exportcore.export.htmlcore.export.markdowncore.fscore.highlightscore.integrations.coq_nvimcore.integrations.nvim-cmpcore.integrations.nvim-compecore.integrations.treesittercore.iterocore.journalcore.keybindscore.latex.renderercore.looking-glasscore.neorgcmdcore.neorgcmd.commands.returncore.pivotcore.presentercore.promocore.qol.toccore.qol.todo_itemscore.queries.nativecore.scannercore.storagecore.summarycore.syntaxcore.tanglecore.tempuscore.text-objectscore.todo-introspectorcore.uicore.ui.calendar