git/list[1] front-page[2] threads[3] people[4] search[5] about
 

[PATCH] fixup! vimdiff: add tool documentation

From
Philippe Blain <levraiphilippeblain@gmail.com>
Date
Mar 29, 2022, 12:54 UTC
Message-ID
<20220329125400.63337-1-levraiphilippeblain@gmail.com>
In-Reply-To
<xmqqy20ty3k6.fsf@gitster.g>
Signed-off-by: Philippe Blain <levraiphilippeblain@gmail.com>
---
Hi Junio, Fernando,

I think the canonical Asciidoc way would be to use a listing block (start and end the block with '----', and not indenting the lines at all, as is done in a few places in the docs), but in this case the parser gets confused about the several dashes in the content of the block. So we can use a "literal block" instead [1].

[1] https://docs.asciidoctor.org/asciidoc/latest/verbatim/literal-blocks/
 Documentation/mergetools/vimdiff.txt | 174 ++++++++++++++-------------
 1 file changed, 90 insertions(+), 84 deletions(-)
diff --git a/Documentation/mergetools/vimdiff.txt b/Documentation/mergetools/vimdiff.txt
index f63fc48c29..1cc9c133f9 100644
--- a/Documentation/mergetools/vimdiff.txt
+++ b/Documentation/mergetools/vimdiff.txt
@@ -3,17 +3,17 @@ Description
 
 When specifying `--tool=vimdiff` in `git mergetool` Git will open Vim with a 4
 windows layout distributed in the following way:
-
-    ------------------------------------------
-    |             |           |              |
-    |   LOCAL     |   BASE    |   REMOTE     |
-    |             |           |              |
-    ------------------------------------------
-    |                                        |
-    |                MERGED                  |
-    |                                        |
-    ------------------------------------------
-
+....
+------------------------------------------
+|             |           |              |
+|   LOCAL     |   BASE    |   REMOTE     |
+|             |           |              |
+------------------------------------------
+|                                        |
+|                MERGED                  |
+|                                        |
+------------------------------------------
+....
 `LOCAL`, `BASE` and `REMOTE` are read-only buffers showing the contents of the
 conflicting file in specific commits ("commit you are merging into", "common
 ancestor commit" and "commit you are merging from" respectively)
@@ -56,14 +56,15 @@ needed in this case. The next layout definition is equivalent:
 +
 --
 If, for some reason, we are not interested in the `BASE` buffer.
-
-           ------------------------------------------
-           |             |           |              |
-           |             |           |              |
-           |   LOCAL     |   MERGED  |   REMOTE     |
-           |             |           |              |
-           |             |           |              |
-           ------------------------------------------
+....
+------------------------------------------
+|             |           |              |
+|             |           |              |
+|   LOCAL     |   MERGED  |   REMOTE     |
+|             |           |              |
+|             |           |              |
+------------------------------------------
+....
 --
 * `layout = "MERGED"`
 +
@@ -71,14 +72,15 @@ If, for some reason, we are not interested in the `BASE` buffer.
 Only the `MERGED` buffer will be shown. Note, however, that all the other
 ones are still loaded in vim, and you can access them with the "buffers"
 command.
-
-           ------------------------------------------
-           |                                        |
-           |                                        |
-           |                 MERGED                 |
-           |                                        |
-           |                                        |
-           ------------------------------------------
+....
+------------------------------------------
+|                                        |
+|                                        |
+|                 MERGED                 |
+|                                        |
+|                                        |
+------------------------------------------
+....
 --
 * `layout = "@LOCAL,REMOTE"`
 +
@@ -86,16 +88,17 @@ command.
 When `MERGED` is not present in the layout, you must "mark" one of the
 buffers with an asterisk. That will become the buffer you need to edit and
 save after resolving the conflicts.
-
-           ------------------------------------------
-           |                   |                    |
-           |                   |                    |
-           |                   |                    |
-           |     LOCAL         |    REMOTE          |
-           |                   |                    |
-           |                   |                    |
-           |                   |                    |
-           ------------------------------------------
+....
+------------------------------------------
+|                   |                    |
+|                   |                    |
+|                   |                    |
+|     LOCAL         |    REMOTE          |
+|                   |                    |
+|                   |                    |
+|                   |                    |
+------------------------------------------
+....
 --
 * `layout = "LOCAL,BASE,REMOTE / MERGED + BASE,LOCAL + BASE,REMOTE"`
 +
@@ -103,59 +106,62 @@ save after resolving the conflicts.
 Three tabs will open: the first one is a copy of the default layout, while
 the other two only show the differences between (`BASE` and `LOCAL`) and
 (`BASE` and `REMOTE`) respectively.
-
-           ------------------------------------------
-           | <TAB #1> |  TAB #2  |  TAB #3  |       |
-           ------------------------------------------
-           |             |           |              |
-           |   LOCAL     |   BASE    |   REMOTE     |
-           |             |           |              |
-           ------------------------------------------
-           |                                        |
-           |                MERGED                  |
-           |                                        |
-           ------------------------------------------
-
-           ------------------------------------------
-           |  TAB #1  | <TAB #2> |  TAB #3  |       |
-           ------------------------------------------
-           |                   |                    |
-           |                   |                    |
-           |                   |                    |
-           |     BASE          |    LOCAL           |
-           |                   |                    |
-           |                   |                    |
-           |                   |                    |
-           ------------------------------------------
-
-           ------------------------------------------
-           |  TAB #1  |  TAB #2  | <TAB #3> |       |
-           ------------------------------------------
-           |                   |                    |
-           |                   |                    |
-           |                   |                    |
-           |     BASE          |    REMOTE          |
-           |                   |                    |
-           |                   |                    |
-           |                   |                    |
-           ------------------------------------------
+....
+------------------------------------------
+| <TAB #1> |  TAB #2  |  TAB #3  |       |
+------------------------------------------
+|             |           |              |
+|   LOCAL     |   BASE    |   REMOTE     |
+|             |           |              |
+------------------------------------------
+|                                        |
+|                MERGED                  |
+|                                        |
+------------------------------------------
+....
+....
+------------------------------------------
+|  TAB #1  | <TAB #2> |  TAB #3  |       |
+------------------------------------------
+|                   |                    |
+|                   |                    |
+|                   |                    |
+|     BASE          |    LOCAL           |
+|                   |                    |
+|                   |                    |
+|                   |                    |
+------------------------------------------
+....
+....
+------------------------------------------
+|  TAB #1  |  TAB #2  | <TAB #3> |       |
+------------------------------------------
+|                   |                    |
+|                   |                    |
+|                   |                    |
+|     BASE          |    REMOTE          |
+|                   |                    |
+|                   |                    |
+|                   |                    |
+------------------------------------------
+....
 --
 * `layout = "LOCAL,BASE,REMOTE / MERGED + BASE,LOCAL + BASE,REMOTE + (LOCAL/BASE/REMOTE),MERGED"`
 +
 --
 Same as the previous example, but adds a fourth tab with the same
 information as the first tab, with a different layout.
-
-           ---------------------------------------------
-           |  TAB #1  |  TAB #2  |  TAB #3  | <TAB #4> |
-           ---------------------------------------------
-           |       LOCAL         |                     |
-           |---------------------|                     |
-           |       BASE          |        MERGED       |
-           |---------------------|                     |
-           |       REMOTE        |                     |
-           ---------------------------------------------
-
+....
+---------------------------------------------
+|  TAB #1  |  TAB #2  |  TAB #3  | <TAB #4> |
+---------------------------------------------
+|       LOCAL         |                     |
+|---------------------|                     |
+|       BASE          |        MERGED       |
+|---------------------|                     |
+|       REMOTE        |                     |
+---------------------------------------------
+....
 Note how in the third tab definition we need to use parenthesis to make `,`
 have precedence over `/`.
 --
-- 
2.29.2
Previous: Junio C HamanoNext: Junio C Hamano
Message 12 of 37 in “vimdiff: new implementation with layout support”
  1. 0/4 vimdiff: new implementation with layout supportFernando Ramos, Mar 28, 2022
  2. 1/4 vimdiff: new implementation with layout supportFernando Ramos, Mar 28, 2022
  3. 2/4 vimdiff: integrate layout tests in the unit tests framework ('t' folder)Fernando Ramos, Mar 28, 2022
  4. 4/4 vimdiff: add description to already existing diff/merge toolsFernando Ramos, Mar 28, 2022
  5. Junio C HamanoMar 29, 2022
  6. Philippe BlainMar 29, 2022
  7. Junio C HamanoMar 29, 2022
  8. Fernando RamosMar 29, 2022
  9. 3/4 vimdiff: add tool documentationFernando Ramos, Mar 28, 2022
  10. Fernando RamosMar 28, 2022
  11. Junio C HamanoMar 29, 2022
  12. fixup! vimdiff: add tool documentationPhilippe Blain, Mar 29, 2022
  13. Junio C HamanoMar 29, 2022
  14. Philippe BlainMar 29, 2022
  15. Junio C HamanoMar 29, 2022
  16. Philippe BlainMar 29, 2022
  17. Philippe BlainMar 29, 2022
  18. Philippe BlainMar 29, 2022
  19. Fernando RamosMar 29, 2022
  20. 0/5 vimdiff: new implementation with layout supportFernando Ramos, Mar 29, 2022
  21. 1/5 vimdiff: new implementation with layout supportFernando Ramos, Mar 29, 2022
  22. 2/5 vimdiff: integrate layout tests in the unit tests framework ('t' folder)Fernando Ramos, Mar 29, 2022
  23. 3/5 vimdiff: add tool documentationFernando Ramos, Mar 29, 2022
  24. 4/5 mergetools: add description to all diff/merge toolsFernando Ramos, Mar 29, 2022
  25. 5/5 mergetools: add tools description to `git help config`Fernando Ramos, Mar 29, 2022
  26. Philippe BlainMar 30, 2022
  27. Fernando RamosMar 30, 2022
  28. Philippe BlainMar 30, 2022
  29. 0/4 vimdiff: new implementation with layout supportFernando Ramos, Mar 30, 2022
  30. 1/4 vimdiff: new implementation with layout supportFernando Ramos, Mar 30, 2022
  31. 2/4 vimdiff: integrate layout tests in the unit tests framework ('t' folder)Fernando Ramos, Mar 30, 2022
  32. 3/4 vimdiff: add tool documentationFernando Ramos, Mar 30, 2022
  33. Philippe BlainApr 3, 2022
  34. Junio C HamanoApr 3, 2022
  35. Fernando RamosApr 4, 2022
  36. Junio C HamanoApr 4, 2022
  37. 4/4 mergetools: add description to all diff/merge toolsFernando Ramos, Mar 30, 2022

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.