Skip to content

Instantly share code, notes, and snippets.

@leodemoura
Created September 9, 2014 23:14
Show Gist options
  • Save leodemoura/5826046da0a1e7c64c9b to your computer and use it in GitHub Desktop.
Save leodemoura/5826046da0a1e7c64c9b to your computer and use it in GitHub Desktop.
magit configuration for emacs
;; =======================================
;; Magit
(require 'magit)
(global-set-key "\C-xg" 'magit-status)
(setq vc-display-status nil)
;; full screen magit-status
(defadvice magit-status (around magit-fullscreen activate)
(window-configuration-to-register :magit-fullscreen)
ad-do-it
(delete-other-windows))
(defun magit-quit-session ()
"Restores the previous window configuration and kills the magit buffer"
(interactive)
(kill-buffer)
(jump-to-register :magit-fullscreen))
(define-key magit-status-mode-map (kbd "q") 'magit-quit-session)
;; (define-key magit-mode-map "c" 'magit-commit)
;; =======================================
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment