diff options
| -rw-r--r-- | ravi-init-vc.el | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/ravi-init-vc.el b/ravi-init-vc.el index f3bd350..ab93594 100644 --- a/ravi-init-vc.el +++ b/ravi-init-vc.el @@ -70,6 +70,24 @@ (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) ) :ensure t ) |
