Skip to content

burgr033/presenterm.nvim

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Presenterm.nvim

a fork of presenterm.nvim by marianozunino

Requirements

  • presenterm (tested with 0.14.0)

Features

  • Launch Preview in snacks terminal
  • Launch PDF export

Installation

Using lazy.nvim

  {
    "burgr033/presenterm.nvim",
    ft = "markdown", -- lazy-load on markdown files
    opts = {},       -- optional: pass config options
    config = function(_, opts)
      require("presenterm").setup(opts)

      -- Define mappings only after the plugin is loaded (for markdown)
      vim.keymap.set("n", "<localleader>e", function()
        require("presenterm").export_pdf()
      end, { desc = "Export presentation as PDF", buffer = true })

      vim.keymap.set({ "n", "t" }, "<localleader>p", function()
        local count = vim.v.count > 0 and vim.v.count or nil
        if vim.fn.mode() == "t" then
          vim.api.nvim_feedkeys(vim.api.nvim_replace_termcodes("<C-\\><C-n>", true, false, true), "n", false)
        end
        require("presenterm").toggle_preview(count)
      end, { desc = "Toggle preview (with optional slide number)", buffer = true })    end
  }

Configuration

No configuration needed. You just need to open up any *.md file

Commands

  • PTExportPDF launches presenterm with -e to export to pdf
  • PTTogglePreview toggles a preview window in snacks.terminal

Acknowledgements

About

a neovim plugin that can toggle preview of presenterm and export to pdf from within neovim

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Languages

  • Lua 100.0%