[default] Move ediff key bindings from SPC E to SPC D prefix

And add documentation
This commit is contained in:
syl20bnr 2020-02-01 16:26:08 -05:00
parent 79842c89cf
commit 51c7fb961b
3 changed files with 101 additions and 64 deletions

View File

@ -715,33 +715,33 @@ Other:
(thanks to Codruț Constantin Gușoi)
- New key binding ~SPC b H~ to open or select the =*Help*= buffer
(thanks to duianto)
- New ~SPC E~ prefix for ediff commands:
- ~SPC E b 3~ ediff-buffers3
- ~SPC E b b~ ediff-buffers
- ~SPC E p b~ ediff-patch-buffer
- ~SPC E B~ ediff-backup
- ~SPC E d 3~ ediff-directories3
- ~SPC E d d~ ediff-directories
- ~SPC E d r~ ediff-directory-revisions
- ~SPC E f .~ spacemacs/ediff-dotfile-and-template
- ~SPC E f 3~ ediff-files3
- ~SPC E f f~ ediff-files
- ~SPC E f p~ ediff-patch-file
- ~SPC E h~ ediff-documentation
- ~SPC E m b 3~ ediff-merge-buffers-with-ancestor
- ~SPC E m b b~ ediff-merge-buffers
- ~SPC E m d 3~ ediff-merge-directories-with-ancestor
- ~SPC E m d d~ ediff-merge-directories
- ~SPC E m f 3~ ediff-merge-files-with-ancestor
- ~SPC E m f f~ ediff-merge-files
- ~SPC E m r 3~ ediff-merge-revisions-with-ancestor
- ~SPC E m r r~ ediff-merge-revisions
- ~SPC E r l~ ediff-regions-linewise
- ~SPC E r w~ ediff-regions-wordwise
- ~SPC E s~ ediff-show-registry
- ~SPC E v~ ediff-revision
- ~SPC E w l~ ediff-windows-linewise
- ~SPC E w w~ ediff-windows-wordwise
- New ~SPC D~ prefix for diff commands using =ediff=:
- ~SPC D b 3~ ediff-buffers3
- ~SPC D b b~ ediff-buffers
- ~SPC D b p~ ediff-patch-buffer
- ~SPC D B~ ediff-backup
- ~SPC D d 3~ ediff-directories3
- ~SPC D d d~ ediff-directories
- ~SPC D d r~ ediff-directory-revisions
- ~SPC D f .~ spacemacs/ediff-dotfile-and-template
- ~SPC D f 3~ ediff-files3
- ~SPC D f f~ ediff-files
- ~SPC D f p~ ediff-patch-file
- ~SPC D h~ ediff-documentation
- ~SPC D m b 3~ ediff-merge-buffers-with-ancestor
- ~SPC D m b b~ ediff-merge-buffers
- ~SPC D m d 3~ ediff-merge-directories-with-ancestor
- ~SPC D m d d~ ediff-merge-directories
- ~SPC D m f 3~ ediff-merge-files-with-ancestor
- ~SPC D m f f~ ediff-merge-files
- ~SPC D m r 3~ ediff-merge-revisions-with-ancestor
- ~SPC D m r r~ ediff-merge-revisions
- ~SPC D r l~ ediff-regions-linewise
- ~SPC D r w~ ediff-regions-wordwise
- ~SPC D s~ ediff-show-registry
- ~SPC D v~ ediff-revision
- ~SPC D w l~ ediff-windows-linewise
- ~SPC D w w~ ediff-windows-wordwise
(thanks to Spenser Truex)
- New ~SPC K~ prefix and subprefixes to use keyboard macros built-ins:
- ~SPC K (~ kmacro-start-macro-or-insert-counter

View File

@ -194,6 +194,7 @@
- [[#lisp-state-key-bindings][Lisp state key bindings]]
- [[#emacs-lisp-specific-key-bindings][Emacs lisp specific key bindings]]
- [[#mouse-usage][Mouse usage]]
- [[#comparing-diff][Comparing (diff)]]
- [[#managing-projects][Managing projects]]
- [[#registers][Registers]]
- [[#errors-handling][Errors handling]]
@ -3396,6 +3397,42 @@ There are some added mouse features set for the line number margin (if shown):
- drag across line number margin visually selects the region
- double click in line number margin visually select the current code block
** Comparing (diff)
To compare buffers, files, directories or even windows use the prefix ~SPC D~.
Spacemacs uses the powerful embedded =ediff= to do comparisons, help for =ediff=
can be opened using ~SPC D h~.
All =ediff= commands starts with D:
| Key binding | Description |
|---------------+-----------------------------------------------------------------------------------------------------------------------------------|
| ~SPC D b 3~ | ask for 3 opened buffers and start an ediff session with them |
| ~SPC D b b~ | ask for 2 opened buffers and start an ediff session with them |
| ~SPC D b p~ | ask for a buffer or file that contains a patch to apply to a buffer and start an ediff session with the result |
| ~SPC D B~ | ask for a file and run ediff with its backup file |
| ~SPC D d 3~ | ask for 3 directories and run ediff on them comparing files that have the same name in all of them |
| ~SPC D d d~ | ask for 2 directories and run ediff on them comparing files that have the same name in both |
| ~SPC D d r~ | run ediff on a directory comparing its files with their revisions if under version control |
| ~SPC D f .~ | start an ediff session between your =.spacemacs= and its default template in Spacemacs =core= |
| ~SPC D f 3~ | ask for 3 files and start an ediff session with them |
| ~SPC D f f~ | ask for 2 files and start an ediff session with them |
| ~SPC D f p~ | ask for a buffer or file that contains a patch to apply to a file and start an ediff session with the result |
| ~SPC D h~ | open ediff documentation within Emacs |
| ~SPC D m b 3~ | start an ediff merge session between 2 buffers and their ancestor |
| ~SPC D m b b~ | start an ediff merge session between 2 buffers |
| ~SPC D m d 3~ | start an ediff merge session between files with the same name in 2 directories and with a 3rd directory containing their ancestor |
| ~SPC D m d d~ | start an ediff merge session between files with the same name in 2 directories |
| ~SPC D m f 3~ | start an ediff merge session between 2 files and their ancestor |
| ~SPC D m f f~ | start an ediff merge session between 2 files |
| ~SPC D m r 3~ | start an ediff merge session between two revisions of a file with a common ancestor |
| ~SPC D m r r~ | start an ediff merge session between two revisions of a file |
| ~SPC D r l~ | start an ediff session between two regions to perform a linewise diff (use this for large regions) |
| ~SPC D r w~ | start an ediff session between two regions to perform a wordwise diff (use this for small regions) |
| ~SPC D s~ | display ediff registries |
| ~SPC D v~ | start ediff between versions of a file |
| ~SPC D w l~ | compare linewise the portions of visible text of 2 windows which are selected by clicking |
| ~SPC D w w~ | compare wordwise the portions of visible text of 2 windows which are selected by clicking |
** Managing projects
Projects in Spacemacs are managed with [[https://github.com/bbatsov/projectile][projectile]]. In =projectile= projects
are defined implicitly, for instance the root of a project is found when a

View File

@ -28,18 +28,18 @@
("c" "compile/comments")
("C" "capture/colors")
("d" "documentation")
("D" "ediff")
("Db" "buffers")
("Dd" "directories")
("Df" "files")
("Dm" "merge")
("Dmb" "buffers")
("Dmd" "directories")
("Dmf" "files")
("Dmr" "revisions")
("Dr" "regions")
("Dw" "windows")
("e" "errors")
("E" "ediff")
("Eb" "buffers")
("Ed" "directories")
("Ef" "files")
("Em" "merge")
("Emb" "buffers")
("Emd" "directories")
("Emf" "files")
("Emr" "revisions")
("Er" "regions")
("Ew" "windows")
("f" "files")
("fC" "files/convert")
("fe" "emacs(spacemacs)")
@ -289,32 +289,32 @@
:evil-leader "e.")
;; ediff ----------------------------------------------------------------------
(spacemacs/set-leader-keys
"Eb3" 'ediff-buffers3
"Ebb" 'ediff-buffers
"Ebp" 'ediff-patch-buffer
"EB" 'ediff-backup
"Ed3" 'ediff-directories3
"Edd" 'ediff-directories
"Edr" 'ediff-directory-revisions
"Ef." 'spacemacs/ediff-dotfile-and-template
"Ef3" 'ediff-files3
"Eff" 'ediff-files
"Efp" 'ediff-patch-file
"Eh" 'ediff-documentation
"Emb3" 'ediff-merge-buffers-with-ancestor
"Embb" 'ediff-merge-buffers
"Emd3" 'ediff-merge-directories-with-ancestor
"Emdd" 'ediff-merge-directories
"Emf3" 'ediff-merge-files-with-ancestor
"Emff" 'ediff-merge-files
"Emr3" 'ediff-merge-revisions-with-ancestor
"Emrr" 'ediff-merge-revisions
"Erl" 'ediff-regions-linewise
"Erw" 'ediff-regions-wordwise
"Es" 'ediff-show-registry
"Ev" 'ediff-revision
"Ewl" 'ediff-windows-linewise
"Eww" 'ediff-windows-wordwise)
"Db3" 'ediff-buffers3
"Dbb" 'ediff-buffers
"Dbp" 'ediff-patch-buffer
"DB" 'ediff-backup
"Dd3" 'ediff-directories3
"Ddd" 'ediff-directories
"Ddr" 'ediff-directory-revisions
"Df." 'spacemacs/ediff-dotfile-and-template
"Df3" 'ediff-files3
"Dff" 'ediff-files
"Dfp" 'ediff-patch-file
"Dh" 'ediff-documentation
"Dmb3" 'ediff-merge-buffers-with-ancestor
"Dmbb" 'ediff-merge-buffers
"Dmd3" 'ediff-merge-directories-with-ancestor
"Dmdd" 'ediff-merge-directories
"Dmf3" 'ediff-merge-files-with-ancestor
"Dmff" 'ediff-merge-files
"Dmr3" 'ediff-merge-revisions-with-ancestor
"Dmrr" 'ediff-merge-revisions
"Drl" 'ediff-regions-linewise
"Drw" 'ediff-regions-wordwise
"Ds" 'ediff-show-registry
"Dv" 'ediff-revision
"Dwl" 'ediff-windows-linewise
"Dww" 'ediff-windows-wordwise)
;; file -----------------------------------------------------------------------
(spacemacs/set-leader-keys
"fA" 'spacemacs/find-file-and-replace-buffer