Skip to content
Find file
Fetching contributors…
Cannot retrieve contributors at this time
68 lines (51 sloc) 1.93 KB
(autoload 'magit-status "magit")
(eval-after-load "magit"
(require 'magit-svn)
;; Subtler highlight
(set-face-background 'magit-item-highlight "#121212")
(set-face-foreground 'diff-context "#666666")
(set-face-foreground 'diff-added "#00cc33")
(set-face-foreground 'diff-removed "#ff0000")
;; Load git configurations
;; For instance, to run magit-svn-mode in a project, do:
;; git config --add magit.extension svn
(add-hook 'magit-mode-hook 'magit-load-config-extensions)
;; C-x C-k to kill file on line
(defun magit-kill-file-on-line ()
"Show file on current magit line and prompt for deletion."
(define-key magit-status-mode-map (kbd "C-x C-k") 'magit-kill-file-on-line)
;; full screen magit-status
(defadvice magit-status (around magit-fullscreen activate)
(window-configuration-to-register :magit-fullscreen)
(defun magit-quit-session ()
"Restores the previous window configuration and kills the magit buffer"
(jump-to-register :magit-fullscreen))
(define-key magit-status-mode-map (kbd "q") 'magit-quit-session)
;; ignore whitespace
(defun magit-toggle-whitespace ()
(if (member "-w" magit-diff-options)
(defun magit-ignore-whitespace ()
(add-to-list 'magit-diff-options "-w")
(defun magit-dont-ignore-whitespace ()
(setq magit-diff-options (remove "-w" magit-diff-options))
(define-key magit-status-mode-map (kbd "W") 'magit-toggle-whitespace)
(provide 'setup-magit)
Jump to Line
Something went wrong with that request. Please try again.