The sfm-paste
extension is a plugin for the sfm plugin, providing a convenient way to paste text or images into new files within the sfm file explorer.
Here is a short demonstration of the sfm-paste
extension in action:
sfm-paste.mp4
Before using sfm-paste.nvim
, ensure that you have the following prerequisites:
- macOS: Install the
pngpaste
command-line tool by runningbrew install pngpaste
using Homebrew. This is required for pasting images from the clipboard on macOS.
Note: sfm-paste.nvim
is currently supported on macOS only. Contributions to add support for other platforms are welcome.
To install the sfm-paste
extension, you will need to have the sfm plugin installed. You can then install the extension using your preferred plugin manager. For example, using packer.nvim:
{
"dinhhuy258/sfm.nvim",
requires = {
{ "dinhhuy258/sfm-paste.nvim" },
},
config = function()
local sfm_explorer = require("sfm").setup {}
sfm_explorer:load_extension "sfm-paste"
end
}
The sfm-paste
plugin provides the following configuration options:
local default_config = {
mappings = {
paste = { "<C-v>" },
},
}
You can override the default configuration in load_extension
method
sfm_explorer:load_extension("sfm-paste", {
mappings = {
paste = { "<C-v>", "p" },
},
})
This project was inspired by and includes references to the clipboard-image.nvim project. We would like to thank the author for their contributions and code references.