epwalsh / epwalsh/obsidian.nvim

Default ObsidianPasteImg to normal p if there is no image in the buffer

Open
#549 1 comment 0 reactions 0 assignees View on GitHub
feature request
Dominant language
Lua
Stars
6.2k
Forks
250
PR merge metrics
No merged PRs in 30d

Description

### 🚀 The feature, motivation and pitch

Hi, I would like to map ObsidianPasteImg to `p` inside markdown files. I wanted to execute ObsidianPasteImg if there is an image in the buffer or just use the normal `p` behaviour otherwise. Would it be possible to either expose `clipboard_is_img` or implement this behaviour through ObsidianPasteImg itself? If the latter, maybe it could be with a setting in the config?

### Alternatives

_No response_

### Additional context

_No response_

Contributor guide

Open the contributing guide

Research direction

Start by locating the ObsidianPasteImg entry point and the existing clipboard_is_img behavior. Check how configuration is exposed, then verify that mapping ObsidianPasteImg to p in Markdown uses normal p behavior when the buffer has no image and image-pasting behavior otherwise.

Written by the indexing model from the issue text.

Assessment

Tech stack
lua
Domain
tooling
Issue type
Feature
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.