I have this on my init.el
;; magit status
(define-key evil-motion-state-map "gs" 'magit-status)
But I would like to have another binding, for C-u M-x magit-status
(C-u is the universal-argument)
Something like (which obviously does not work):
;; magit status
(define-key evil-motion-state-map "ga" 'C-u magit-status)
rationale: with C-u M-x magit-status
, magit allows you to supply a directory where a git repo resides, so you do not have to have an opened file that resides inside the git repo where you want to perform git actions.
(define-key evil-motion-state-map "ga" (lambda (interactive) (let ((current-prefix-arg 4)) (call-interactively 'magit-status))))
– Drew Oct 7 '16 at 14:59