From 56f5b41257f8749dd4f9e9296c0888c2a62adb12 Mon Sep 17 00:00:00 2001 From: Valentin Gehrke Date: Tue, 17 Oct 2017 11:40:14 +0200 Subject: [PATCH] emacs - Magit fullscreen mode --- emacs/.emacs.d/init.el | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/emacs/.emacs.d/init.el b/emacs/.emacs.d/init.el index 6ac0096..bdb263e 100644 --- a/emacs/.emacs.d/init.el +++ b/emacs/.emacs.d/init.el @@ -452,7 +452,18 @@ :ensure t :bind ("C-x g" . magit-status) :config - (evil-set-initial-state 'git-commit-mode 'insert)) + ;; Use insert mode in commit window + (evil-set-initial-state 'git-commit-mode 'insert) + ;; Magit fullscreen + (defadvice magit-status (around magit-fullscreen activate) + (window-configuration-to-register :magit-fullscreen) + ad-do-it + (delete-other-windows)) + (defun magit-quit-fullscreen () + (interactive) + (kill-buffer) + (jump-to-register :magit-fullscreen)) + (define-key magit-status-mode-map (kbd "q") 'magit-quit-fullscreen)) ;; Undo-Tree (use-package undo-tree