It's an Emacs extension, using it you can just use one key to save clipboard image to disk file, and at the same time insert the file link(org-mode/markdown-mode) or file path(other mode) to current point.
Based on PasteEx, only support Windows.
Put pasteex-mode.el
to your load-path
. The load-path
is usually ~/elisp/
. It's set in your ~/.emacs
file like this:
(add-to-list 'load-path (expand-file-name "~/elisp"))
(require 'pasteex-mode)
- Windows: Add
PasteEx.exe
executable to environment PATH, or set the variablepasteex-executable-path
in your config file, like this:
(setq pasteex-executable-path "D:/program/PasteEx/PasteEx.exe")
- Bind your favorite key to function
pasteex-image
, like this:
(global-set-key (kbd "C-x p i") 'pasteex-image)
- After you make a screenshot to clipboard, or copy a PNG image file to clipboard, then just press
C-x p i
shortcut, and the file link or path will be inserted to your buffer immediately, the screenshot image file is saved to./{buffername}_imgs/
directory by default.
Support these functions:
pasteex-image
: Save clipboard image to disk file, and insert file path to current point.pasteex-delete-img-link-and-file-at-line
: Delete image link at line, and delete related disk file at the same time.pasteex-is-png-file
: Check a file is png file or not.
- Only support Windows, because PasteEx only support Windows now.
- That's all, enjoy it :)