Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/benlubas/image-save.nvim

Easily save images displayed via image.nvim
https://github.com/benlubas/image-save.nvim

neovim neovim-plugin nvim nvim-plugin

Last synced: about 1 month ago
JSON representation

Easily save images displayed via image.nvim

Awesome Lists containing this project

README

        

# image-save.nvim

An incredibly simple plugin that adds an easy command for saving
[3rd/image.nvim](https://github.com/3rd/image.nvim) images.

https://github.com/benlubas/image-save.nvim/assets/56943754/99ef6bba-b943-4e07-8414-657230ef779a

## Install

with Lazy:

```lua
{ "benlubas/image-save.nvim", cmd = "SaveImage" },
```

## Usage

The `:SaveImage` will find the nearest image to your cursor in the current window, and prompt you to
save that image.

The file path you enter is used in a `cp` command from the current wording directory. So you can
pass `~/path/to/cwd/image.png` or just `image.png` and those are the same.

_Yes I know the command and the plugin title are 'backwards' :SaveImage makes more sense, but
save-image.nvim makes it seem like I'm some type of Messiah_

## Config

You do not need to call setup unless you want to enable the mouse menu option.

```lua
require("image-save").setup({
-- Add a "Save Image" option to the Popup menu.
-- This lets you "right click > save" an image.
-- Will remove "How to Disable Mouse" from the Popup menu.
enable_mouse = true
})
```

## Shameless Self Promotion

This plugin is made for use with the [molten-nvim](https://github.com/benlubas/molten-nvim) plugin
to allow users to easily save their plots/charts. Go check it out.