diff options
| author | Ravi R Kiran <aine.marina@gmail.com> | 2015-10-23 18:57:59 (GMT) |
|---|---|---|
| committer | Ravi R Kiran <aine.marina@gmail.com> | 2015-10-23 18:57:59 (GMT) |
| commit | cd1924466152177ea06b17c843f256463c1b91b8 (patch) | |
| tree | af90afe028e5e392f242a3ea36302aafe1c1769d /lisp/ravi-init-vc.el | |
| parent | 5561df232cfa49822f322196d98170f95aa1139e (diff) | |
| parent | 74c319ef12dd3130f6afc17abc59404b59d601d1 (diff) | |
| download | dotemacs-cd1924466152177ea06b17c843f256463c1b91b8.zip dotemacs-cd1924466152177ea06b17c843f256463c1b91b8.tar.gz dotemacs-cd1924466152177ea06b17c843f256463c1b91b8.tar.bz2 | |
Merge branch 'master' into rtags-attempt
* master: (139 commits)
Add pdf-tools as a nicer replacement for doc-view
Add pdf-tools submodule
Fix maildir data with correct path
Add desktop notifications for email
Potential use for modes without repls
Attach files more easily in mu
Update to newest version of mu
Please remove tooltips after a while, please
ace-window gets confused when tooltips are present
Sometimes the dispatch list does come in handy
Pre-populate searches
Succumb to muscle memory of control keys
Remove ropemacs due to disuse
Do not let company-quickhelp steal a global key
Manage word navigation
Use proper helm function to replace completing-read
Electric operators on python mode
Use which-key in preference to guide-key
Navigate easier
Simplify config with magit 2.1.0
...
Diffstat (limited to 'lisp/ravi-init-vc.el')
| -rw-r--r-- | lisp/ravi-init-vc.el | 104 |
1 files changed, 104 insertions, 0 deletions
diff --git a/lisp/ravi-init-vc.el b/lisp/ravi-init-vc.el new file mode 100644 index 0000000..a28a75a --- /dev/null +++ b/lisp/ravi-init-vc.el @@ -0,0 +1,104 @@ +;;; ravi-init-vc.el --- vc control + +;; Copyright (C) 2013 + +;; Author: <ravi@nero.lan> +;; Keywords: vc + +;; This program is free software; you can redistribute it and/or modify +;; it under the terms of the GNU General Public License as published by +;; the Free Software Foundation, either version 3 of the License, or +;; (at your option) any later version. + +;; This program is distributed in the hope that it will be useful, +;; but WITHOUT ANY WARRANTY; without even the implied warranty of +;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +;; GNU General Public License for more details. + +;; You should have received a copy of the GNU General Public License +;; along with this program. If not, see <http://www.gnu.org/licenses/>. + +;;; Commentary: + +;; Version control initialization + +;;; Code: + +;; Git +(use-package magit + :bind (("<M-f3>" . magit-status) + ("C-x v B" . magit-blame) + ("C-x v F" . magit-file-log)) + :config + (progn + (setq-default + magit-process-popup-time 10 + magit-diff-refine-hunk t + magit-completing-read-function (if ravi/use-helm-instead-of-ido + 'helm--completing-read-default + 'magit-ido-completing-read)) + + (setq magit-restore-window-configuration t) + + (use-package magit-svn + :config (add-hook 'magit-mode-hook 'magit-svn-mode) + :ensure t) + ) + :ensure t) +(use-package git-gutter + :config + (progn + (use-package git-gutter-fringe + :ensure t) + (global-git-gutter-mode 1) + ) + :ensure t + :diminish git-gutter-mode + ) +(use-package gitignore-mode + :ensure t) +(use-package gitconfig-mode + :ensure t) +(use-package git-messenger + :bind ("C-x v p" . git-messenger:popup-message) + :ensure t) +(use-package git-timemachine + :bind ("C-x v t" . git-timemachine) + :ensure t) +(use-package vc-git + :bind ("C-x v f" . vc-git-grep)) + +;; Stolen almost entirely from Fuco (Matus Goljer) +(use-package ediff + :config + (progn + (defvar my-ediff-before-config nil "Window configuration before ediff.") + (defvar my-ediff-after-config nil "Window configuration after ediff.") + + (defun my-ediff-before-setup () + "Function to be called before any buffers or window setup for + ediff." + (setq my-ediff-before-config (current-window-configuration)) + (set-register ?b (list my-ediff-before-config (point-marker)))) + + (defun my-ediff-after-setup () + "Function to be called after buffers and window setup for ediff." + (setq my-ediff-after-config (current-window-configuration)) + (set-register ?e (list my-ediff-after-config (point-marker)))) + + (defun my-ediff-quit () + "Function to be called when ediff quits." + (when my-ediff-before-config + (set-window-configuration my-ediff-before-config)) + ;; clean up ediff bullshit + (->> (buffer-list) + (-map 'buffer-name) + (--select (string-match-p "\\*[Ee]diff" it)) + (-map 'kill-buffer))) + + (add-hook 'ediff-before-setup-hook 'my-ediff-before-setup) + (add-hook 'ediff-after-setup-windows-hook 'my-ediff-after-setup 'append) + (add-hook 'ediff-quit-hook 'my-ediff-quit))) + +(provide 'ravi-init-vc) +;;; ravi-init-vc.el ends here |
