Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/kiran94/maim.nvim
Take Screenshots from Neovim
https://github.com/kiran94/maim.nvim
maim markdown neovim plugin screenshot
Last synced: about 2 months ago
JSON representation
Take Screenshots from Neovim
- Host: GitHub
- URL: https://github.com/kiran94/maim.nvim
- Owner: kiran94
- License: mit
- Created: 2021-12-25T06:49:02.000Z (over 2 years ago)
- Default Branch: main
- Last Pushed: 2023-05-28T16:37:17.000Z (over 1 year ago)
- Last Synced: 2024-06-24T13:51:35.914Z (3 months ago)
- Topics: maim, markdown, neovim, plugin, screenshot
- Language: Lua
- Homepage:
- Size: 19.5 KB
- Stars: 23
- Watchers: 2
- Forks: 0
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# maim.nvim
[![main](https://github.com/kiran94/maim.nvim/actions/workflows/main.yml/badge.svg)](https://github.com/kiran94/maim.nvim/actions/workflows/main.yml) ![GitHub](https://img.shields.io/github/license/kiran94/maim.nvim)
> Neovim plugin for taking screenshots
Take Screenshots directly from [Neovim](https://github.com/neovim/neovim) and embed references into markdown documents. This plugin relies on [maim](https://github.com/naelstrof/maim) being installed on your system.
## Install
Using `lazy.nvim`:
```lua
{ 'kiran94/maim.nvim', config = true, cmd = {"Maim", "MaimMarkdown"} },
```Once installed, you can check if the plugin is ready to work via `:checkhealth maim`. Note that if you take the lazy loaded approach, the plugin will likely needs to be loaded to check health.
### Dependencies
- Neovim 0.9+
- [maim](https://github.com/naelstrof/maim#install-using-your-package-manager-preferred)## Commands
| Command | Description |
| -------- | ------------ |
| `:Maim output_path` | Take a screenshot and save to output_path |
| `:MaimMarkdown output_path [title]` | Take a screenshot and save a markdown reference to the current buffer. The title is optional.|## Example
Writing a Markdown file and need to take a screenshot from reference material and attach. You can use `:MaimMarkdown` to do this without leaving the editor. This will launch `maim` so you can take a screenshot, save the file to the specified location and then add a markdown link in your current buffer.
![demo](https://i.imgur.com/9UsdX0P.gif)
## Developing
Assuming you are at the root of the repo.
1. run `make`
- This will add the local plugin to your `runtimepath` and open the main `init.lua` along with a sample markdown file in a split.
2. Within Neovim, run `:checkhealth maim`
- If you do not have `maim` installed then refer to [this](https://github.com/naelstrof/maim#installation).