Add magit-svn plugin to git layer

This commit is contained in:
syl20bnr 2015-01-27 00:17:51 -05:00
parent 13cbd9f322
commit 8104dcee97
3 changed files with 28 additions and 1 deletions

View file

@ -12,6 +12,7 @@
- [Github support](#github-support)
- [Magit status fullscreen](#magit-status-fullscreen)
- [Magit auto-complete](#magit-auto-complete)
- [Magit SVN plugin](#magit-svn-plugin)
- [Git gutter](#git-gutter)
- [Git](#git)
- [Working with Git](#working-with-git)
@ -85,6 +86,17 @@ function (the path should end up with a `/` to respect Emacs conventions):
(setq magit-repo-dirs '("~/git/"))
```
### Magit SVN plugin
For convenience the magit SVN plugin can be activated directly in the Git
layer by setting the variable `git-enable-magit-svn-plugin` to `t`.
```elisp
(defun dotspacemacs/init ()
(setq-default git-enable-magit-svn-plugin t)
)
```
### Git gutter
In graphical environment `Spacemacs` will display [git-gutter][] icons in
@ -159,7 +171,7 @@ Here are the often used bindings inside a `status buffer`:
<kbd>L l</kbd> | open `log buffer`
<kbd>n</kbd> | next search occurrence
<kbd>C-n</kbd | goto next magit section
<kbd>N</kbd> | previous search occurrence
<kbd>N</kbd> | previous search occurrence _or_ SVN sub-menu
<kbd>P P</kbd> | push
<kbd>C-p</kbd | goto previous magit section
<kbd>q</kbd> | quit

View file

@ -15,6 +15,9 @@
(defvar git-enable-github-support nil
"If non nil the Github packages and extensions are enabled.")
(defvar git-enable-magit-svn-plugin nil
"If non nil `magit-svn' plugin is enabled.")
(defvar git-magit-status-fullscreen nil
"If non nil magit-status buffer is displayed in fullscreen.")

View file

@ -32,6 +32,9 @@ which require an initialization must be listed explicitly in the list.")
magit-gh-pulls
)))
(when git-enable-magit-svn-plugin
(push 'magit-svn git-packages))
(if git-gutter-use-fringe
(push 'git-gutter-fringe git-packages)
(push 'git-gutter git-packages))
@ -262,6 +265,15 @@ which require an initialization must be listed explicitly in the list.")
:init (add-hook 'magit-mode-hook 'turn-on-magit-gitflow)
:config (spacemacs|diminish magit-gitflow-mode "Flow")))
(defun git/init-magit-svn ()
(use-package magit-svn
:commands turn-on-magit-svn
:init (add-hook 'magit-mode-hook 'turn-on-magit-svn)
:config
(progn
(evil-define-key 'emacs magit-status-mode-map
"N" 'magit-key-mode-popup-svn))))
(defun git/init-smeargle ()
(use-package smeargle
:defer t