[Emacs] New keybindings for image-mode, change eshell keybinding

The eshell keybinding changes from SPC o a ' to SPC o '

It is now possible to open an image from image-mode in GIMP directly
as well as rotate it.
This commit is contained in:
Lucien Cartier-Tilet 2021-03-26 13:47:53 +01:00
parent ffacd7d71a
commit 4f7927a5f7
Signed by: phundrak
GPG Key ID: BD7789E705CB8DCA
1 changed files with 19 additions and 2 deletions

View File

@ -4102,12 +4102,12 @@ As this is a new category, lets declare its prefix:
Now, lets also declare the keybindings in this category. ~oac~ will invoke
Emacs calculator, while ~oac~ invokes the calendar, ~oae~ invokes the Eww web
browser, ~oaw~ invokes ~woman~ (actually ~helm-man-woman~), and ~oaW~ invokes
the weather forecast. Lastly, the apostrophe in ~oa'~ will invoke Eshell
the weather forecast. Lastly, the apostrophe in ~o'~ will invoke Eshell
directly, without any popup window as with ~,'~ while ~oan~ will open a new
eshell buffer if another one already exists.
#+BEGIN_SRC emacs-lisp
(spacemacs/set-leader-keys
"oa'" 'eshell
"o'" 'eshell
"oac" 'calc
"oaC" 'calendar
"oae" 'eww
@ -4116,6 +4116,23 @@ eshell buffer if another one already exists.
"oaW" 'wttrin)
#+END_SRC
**** Image mode
:PROPERTIES:
:CUSTOM_ID: User-Configuration-Keybindings-Applications-Image-mode-e5df694e
:END:
Viewing images in Emacs is nice, but I want to be able to do more than just view
them, such as opening them in GIMP. Ill also declare a couple of keybindings
that make sense to me.
#+BEGIN_SRC emacs-lisp
(spacemacs/declare-prefix-for-mode 'image-mode "G" "Open in GIMP")
(spacemacs/declare-prefix-for-mode 'image-mode "o" "Open in external viewer")
(spacemacs/declare-prefix-for-mode 'image-mode "r" "Rotate clockwise")
(spacemacs/set-leader-keys-for-major-mode 'image-mode
"G" (lambda () (interactive) (start-process "" nil "gimp" (buffer-name)))
"o" (lambda () (interactive) (start-process "" nil "xdg-open" (buffer-name)))
"r" 'image-rotate)
#+END_SRC
**** Org tree slide
:PROPERTIES:
:CUSTOM_ID: User_Configuration-Keybindings-Applications-Org_tree_slide-29545c5e