The package provides functions similar to momentary-string-display
but inside popup windows.
Download the repository and add it to your load-path
.
(add-to-list 'load-path "/path/to/momentary-popup/")
(require 'momentary-popup)
(define-key momentary-popup-switch-keymap (kbd "C-c C-o") 'momentary-popup-open-inspector)
Or with use-package
and straight-use-package
:
(use-package momentary-popup
:straight (:repo "KarimAziev/momentary-popup" :type git :host github)
:hook ((momentary-popup-mode . visual-line-mode)
(momentary-popup-inspect-mode . visual-line-mode))
:bind ((:map momentary-popup-switch-keymap
("C-c o" . momentary-popup-open-inspector))
(:map momentary-popup-inspect-keymap
("C-c C-o" . momentary-popup-maybe-find-file))))
momentary-popup
(content &rest setup-args)
Momentarily display CONTENT in popup window.
Display remains until next event is input.
To persist popup type key binding from momentary-popup-switch-keymap
for command momentary-popup-open-inspector
(by default (kbd “C-c C-o”) and (kbd “C-c o”)).
SETUP-ARGS can includes keymaps, syntax table, filename and function.
momentary-popup-file
(file)
Momentarily display content of the FILE in popup window.
Display remains until next event is input.
momentary-popup-open-inspector
Open or restore popup in a buffer `momentary-popup-inspect-buffer-name’.
momentary-popup-switch-keymap
Keymap with commands to execute just before quiting momentary popup. Defaults:
Default Key | Command |
---|---|
C-c C-o | open content in inspect buffer |
momentary-popup-inspect-keymap
Inspect buffer usesmomentary-popup-inspect-keymap
with next defaults:
Default Key | Command |
---|---|
C-c C-o | find existing file from setup args |
C-x 0 | kill inspect buffer |
q | if inspect buffer is readonly kill it, else it self-insert-command |
Keymap with commands to execute just before quiting momentary popup. Defaults: