Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added new tip to use word under cursor as image's name #14

Closed
wants to merge 3 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
22 changes: 20 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -64,8 +64,26 @@ require'clipboard-image'.setup {
|`affix`|`"%s"`|Affix|

## Tips
`WIP`

### Save image name as word under cursor
```lua
require'clipboard-image'.setup {
tex= {
img_dir = "src/assets/img",
img_dir_txt = "/assets/img",
img_name = function()
local cword = vim.fn.expand('<cword>')
vim.fn.feedkeys("diw")
return cword
end,
affix = [[
\begin{figure}
\includegraphics[width=0.8\textwidth]{%s}
\end{figure}
]],
}
}
```
![](./img/wordUnderCursor.gif)
## Questions
You can ask your questions on [discussions](/~https://github.com/ekickx/clipboard-image.nvim/discussions)

Expand Down
Binary file added img/wordUnderCursor.gif
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.