emacs-elpa-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[elpa] scratch/add-vdiff d243767 253/258: README: Add entry points and v


From: Justin Burkett
Subject: [elpa] scratch/add-vdiff d243767 253/258: README: Add entry points and vimdiff bindings
Date: Wed, 17 May 2017 08:14:03 -0400 (EDT)

branch: scratch/add-vdiff
commit d243767ed4b1ac68515c9276f53cc3ea407456a3
Author: Justin Burkett <address@hidden>
Commit: Justin Burkett <address@hidden>

    README: Add entry points and vimdiff bindings
---
 README.org | 33 ++++++++++++++++++++++++++++-----
 1 file changed, 28 insertions(+), 5 deletions(-)

diff --git a/README.org b/README.org
index b835588..16c1a6e 100644
--- a/README.org
+++ b/README.org
@@ -48,9 +48,19 @@ find. Contributions and suggestions are very welcome.
 
 ** Installation and Usage
    
-vdiff was recently added to MELPA, which is the recommended way to install it
-and keep it up to date. To install it you may do =M-x package-install RET vdiff
-RET=.
+vdiff is available in MELPA, which is the recommended way to install it and 
keep
+it up to date. To install it you may do =M-x package-install RET vdiff RET=.
+
+To start a vdiff session, the main entry points are
+
+| Command                | Description                                         
              |
+|------------------------+-------------------------------------------------------------------|
+| =vdiff-buffers=        | Diff two open buffers                               
              |
+| =vdiff-files=          | Diff two files                                      
              |
+| =vdiff-buffers3=       | Diff three open buffers                             
              |
+| =vdiff-files3=         | Diff three files                                    
              |
+| =vdiff-current-file=   | Like =ediff-current-file= (Diff buffer with disk 
version of file) |
+| =vdiff-merge-conflict= | Use vdiff to resolve merge conflicts in current 
file              |
    
 After installing you can bind the commands to your preferred key prefix like 
this
 
@@ -123,8 +133,21 @@ prefix in normal state.
 (evil-define-key 'normal vdiff-mode-map "," vdiff-mode-prefix-map)
 #+END_SRC
 
-To start vdiff, use either =vdiff-files= to select two files or =vdiff-buffers=
-to select two open buffers.
+To match vimdiff bindings some more work is required. The way the =d= command
+for evil is set up makes it difficult to bind =do= and =dp= as they exist in
+vimdiff. Here is a sample set of bindings that avoids this problem (thanks to
address@hidden for these).
+
+#+BEGIN_SRC emacs-lisp
+  (evil-define-minor-mode-key 'normal 'vdiff-mode "]c" 'vdiff-next-hunk)
+  (evil-define-minor-mode-key 'normal 'vdiff-mode "[c" 'vdiff-previous-hunk)
+  (evil-define-minor-mode-key 'normal 'vdiff-mode "zc" 'vdiff-close-fold)
+  (evil-define-minor-mode-key 'normal 'vdiff-mode "zM" 'vdiff-close-all-folds)
+  (evil-define-minor-mode-key 'normal 'vdiff-mode "zo" 'vdiff-open-fold)
+  (evil-define-minor-mode-key 'normal 'vdiff-mode "zR" 'vdiff-open-all-folds)
+  (evil-define-minor-mode-key 'motion 'vdiff-mode "go" 'vdiff-receive-changes)
+  (evil-define-minor-mode-key 'motion 'vdiff-mode "gp" 'vdiff-send-changes)
+#+END_SRC
 
 ** Hydra
 



reply via email to

[Prev in Thread] Current Thread [Next in Thread]