TobinPalmer / pastify.nvim

Paste images into markdown from neovim
The Unlicense
64 stars 12 forks source link

how to set the img name to date-time format without set name everytime #4

Closed geeker-one closed 5 months ago

geeker-one commented 1 year ago

For example,how to set every image name to "%Y-%m-%d-%H-%M-%S.jpg"?

geeker-one commented 1 year ago

done,change the code in if file_name == "": as this:

            if file_name == "":
                file_name=vim.exec_lua("return os.date('%Y-%m-%d-%H:%M:%S')")
                self.logger(f"use date as filename:{file_name}", "INFO")

however, can you add a setting in config that we can set filename as date as preference?

TobinPalmer commented 1 year ago

Ok I will add this to my todo although I don't really use this plugin / nvim as much as I used to.

superzanti commented 5 months ago

Hi @geeker-one I created a pull request that fixes this issue and adds some other features.

TobinPalmer commented 5 months ago

This issue was solved by @geeker-one amazing PR.