(defun my-magit-open-status-in-current-window ()
"Open Magit status buffer in current window."
(interactive)
(if (and (get-buffer "*magit: \.\*")
(equalp "inferior-emacs-lisp-mode" (format "%s" major-mode)))
(switch-to-buffer "*magit: \.\*")
(command-execute 'magit-status)
(bury-buffer)
(switch-to-buffer "*magit: \.\*"))
)
(define-key vcs-map (kbd "v") 'my-magit-open-status-in-current-window)