Skip to content

Picture In Markdown. A plugin written in Lua for Neovim to paste images from clipboard.

License

Notifications You must be signed in to change notification settings

mistgc/pinmd.nvim

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Pinmd

Picture In Markdown

Install

packer.nvim

use 'mistgc/pinmd.nvim'

lazy.nvim

{ 'mistgc/pinmd.nvim' }

Usage

cmd: PinmdPaste

usage

Config

Recommend Config:

options = {
    files = {
        link_format = "relative_path_in_vault",
        location_for_new_attachments = "specified_folder_in_vault",
        attachment_folder_path = "_attachments/" -- folder specified by yourself
    }
}

Default Config:

options = {
    files = {
        link_format = "absolute_path_in_vault", -- "absolute_path_in_vault", "relative_path_in_vault"
        location_for_new_attachments = "vault_folder", -- "vault_folder", "specified_folder_in_vault"
        attachment_folder_path = "assets/imgs/",
    },
    images = {
        name = function()
            return tostring(os.date("%Y-%m-%d-%H-%M-%S"))
        end,
    },
    filetype = {
        default = {
            affix = "%s",
        },
        markdown = {
            affix = "![](%s)",
        },
        asciidoc = {
            affix = "image::%s[]",
        },
    },
}

About

Picture In Markdown. A plugin written in Lua for Neovim to paste images from clipboard.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages