summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--lisp/ravi-init-vc.el112
1 files changed, 14 insertions, 98 deletions
diff --git a/lisp/ravi-init-vc.el b/lisp/ravi-init-vc.el
index 11e3143..0c7ace1 100644
--- a/lisp/ravi-init-vc.el
+++ b/lisp/ravi-init-vc.el
@@ -27,130 +27,46 @@
;; Git
(use-package magit
:bind (("<M-f3>" . magit-status)
+ ("C-x v B" . magit-blame)
("C-x v F" . magit-file-log))
- :init
- (progn
- (setq magit-last-seen-setup-instructions "1.4.0"))
:config
(progn
(setq-default
magit-process-popup-time 10
magit-diff-refine-hunk t
- magit-completing-read-function 'magit-ido-completing-read
- )
-
- ; Since magit-mode-quit-window is used by all magit windows (such as logs),
- ; and since mucking with magit's keymap also leads to the same results, we
- ; avoid showing magit-status in a fullscreen window until another solution
- ; is found.
- ;(require 'fullframe)
- ;(fullframe magit-status magit-mode-quit-window :magit-fullscreen nil)
+ magit-completing-read-function (if ravi/use-helm-instead-of-ido
+ 'helm-completing-read-with-cands-in-buffer
+ 'magit-ido-completing-read))
(setq magit-restore-window-configuration t)
- (diminish 'magit-auto-revert-mode)
-
- (use-package vc-git
- :defer t
- :bind ("C-x v f" . vc-git-grep)
- :config
- (progn
- (global-magit-wip-save-mode)
- (diminish 'magit-wip-save-mode)
- )
- )
-
- ;(after-load 'magit-key-mode
- ; (require 'magit-svn))
-
- (after-load 'compile
- (dolist (defn (list '(git-svn-updated "^\t[A-Z]\t\\(.*\\)$" 1 nil nil 0 1)
- '(git-svn-needs-update "^\\(.*\\): needs update$" 1 nil nil 2 1)))
- (add-to-list 'compilation-error-regexp-alist-alist defn)
- (add-to-list 'compilation-error-regexp-alist (car defn))))
(use-package magit-svn
- :config (add-hook 'magit-mode-hook 'turn-on-magit-svn)
- :ensure t
- )
-
- (defvar git-svn--available-commands nil "Cached list of git svn subcommands")
-
- (defun git-svn (dir)
- "Run a git svn subcommand in DIR."
- (interactive "DSelect directory: ")
- (unless git-svn--available-commands
- (setq git-svn--available-commands
- (sanityinc/string-all-matches
- "^ \\([a-z\\-]+\\) +"
- (shell-command-to-string "git svn help") 1)))
- (let* ((default-directory (vc-git-root dir))
- (compilation-buffer-name-function (lambda (major-mode-name) "*git-svn*")))
- (compile (concat "git svn "
- (ido-completing-read "git-svn command: "
- git-svn--available-commands nil t))))
- )
-
- (defun magit-toggle-whitespace ()
- (interactive)
- (if (member "-w" magit-diff-options)
- (magit-dont-ignore-whitespace)
- (magit-ignore-whitespace)))
-
- (defun magit-ignore-whitespace ()
- (interactive)
- (add-to-list 'magit-diff-options "-w")
- (magit-refresh))
-
- (defun magit-dont-ignore-whitespace ()
- (interactive)
- (setq magit-diff-options (remove "-w" magit-diff-options))
- (magit-refresh))
-
- (bind-key "W" 'magit-toggle-whitespace magit-status-mode-map)
-
- (defun magit-just-amend ()
- (interactive)
- (save-window-excursion
- (magit-with-refresh
- (shell-command "git --no-pager commit --amend --reuse-message=HEAD"))))
- (bind-key "C-a" 'magit-just-amend magit-status-mode-map)
-
+ :config (add-hook 'magit-mode-hook 'magit-svn-mode)
+ :ensure t)
)
- :ensure t
- )
+ :ensure t)
(use-package git-gutter
:config
(progn
(use-package git-gutter-fringe
- :ensure t
- )
+ :ensure t)
(global-git-gutter-mode 1)
)
:ensure t
:diminish git-gutter-mode
)
-(use-package git-commit-mode
- :ensure t
- )
-(use-package git-rebase-mode
- :ensure t
- )
(use-package gitignore-mode
- :ensure t
- )
+ :ensure t)
(use-package gitconfig-mode
- :ensure t
- )
+ :ensure t)
(use-package git-messenger
- :ensure t
:bind ("C-x v p" . git-messenger:popup-message)
- )
+ :ensure t)
(use-package git-timemachine
- :ensure t
:bind ("C-x v t" . git-timemachine)
- )
-(use-package magit-blame
- :bind (("C-x v B" . magit-blame-mode)))
+ :ensure t)
+(use-package vc-git
+ :bind ("C-x v f" . vc-git-grep))
;; Stolen almost entirely from Fuco (Matus Goljer)
(use-package ediff