[defaults] Added shortcut to switch to last compilation buffer

This commit is contained in:
Ivan Yonchovski 2020-04-16 15:06:50 +03:00 committed by Maximilian Wolff
parent 6fbcef0648
commit fb870e84a5
3 changed files with 10 additions and 1 deletions

View File

@ -1016,6 +1016,7 @@ Other:
- Added ~SPC x d l~ =delete-blank-lines= (thanks to duianto)
- Added keybindings for Easy PG built in Emacs application
(thanks to John Stevenson)
- Added ~SPC c b~ to switch to last compilation buffer(thanks to Ivan Yonchovski).
- Improvements:
- Rewrote window layout functions for ~SPC w 1~, ~SPC w 2~, ~SPC w 3~, and
~SPC w 4~ (thanks to Codruț Constantin Gușoi):

View File

@ -1540,6 +1540,13 @@ if prefix argument ARG is given, switch to it in an other, possibly new window."
(when compilation-last-buffer
(delete-windows-on compilation-last-buffer)))
(defun spacemacs/switch-to-compilation-buffer ()
"Go to last compilation buffer."
(interactive)
(if compilation-last-buffer
(pop-to-buffer compilation-last-buffer)
(user-error "There is no compilation buffer?")))
;; Line number

View File

@ -434,7 +434,8 @@
"cC" 'compile
"ck" 'kill-compilation
"cr" 'recompile
"cd" 'spacemacs/close-compilation-window)
"cd" 'spacemacs/close-compilation-window
"cb" 'spacemacs/switch-to-compilation-buffer)
(with-eval-after-load 'compile
(evil-define-key 'motion compilation-mode-map (kbd "gf") 'find-file-at-point)
(define-key compilation-mode-map "r" 'recompile)