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

Re: [PATCH v6 3/3] vimdiff: add tool documentation

From
Junio C Hamano <gitster@pobox.com>
Date
Mar 28, 2022, 05:43 UTC
Message-ID
<xmqqbkxq639i.fsf@gitster.g>
In-Reply-To
<2d1b3c6d-4345-8b7d-b8b8-4baf1edd91f0@gmail.com>
Bagas Sanjaya <bagasdotme@gmail.com> writes:
Show 10 quoted lines
> On 27/03/22 18.23, Fernando Ramos wrote:
>> +When using these variants, in order to specify a custom layout you will have to
>> +set configuration variables `mergetool.gvimdiff.layout` and
>> +`mergetool.nvimdiff.layout` instead of `mergetool.vimdiff.layout`
>> +
>
> What about this wording?
>
> "These variants also have corresponding layout configuration named
>  `mergetool.gvimdiff.layout` and `mergetool.nvimdiff.layout`, respectively."

Hmph. The wording aside, is it a good design that you have to set gvimdiff.layout if you use gvim and your setting to vimdiff.layout has no effect when you are using nvim or gvim?

What is the reason why a user may want to specify them separately?
 * I want to use this layout when using plain vim but gvim is so
   different that I want to use a different one from usability's
   point of view.
 * The layout I want to use with plain vim, when fed to gvim or
   nvim, would totally make them misbehave.  I cannot reuse the same
   layout even if I wanted to.
 * Depending on the kind of conflict I deal with, I want to use
   different layouts, but there is no easy mechanism to choose
   between multiple values I give to mergetool.vimdiff.layout, so I
   use one layout for vimdiff and another for gvimdiff, and
   depending on the layout I want to use, I switch between vimdiff
   and gvimdiff.
 * Something else?

If on the other hand, a user may want to stick to a single layout no matter which variant of vim is used, it may make more sense to just use a single mergetool.vimdiff.layout across all the different variants of vim implementations, and possibly, have their own one override the most generic "vimdiff" one. E.g. gvimdiff would use mergetool.gvimdiff.layout if exists, or mergetool.vimdiff.layout otherwise.

I dunno.
Previous: Bagas SanjayaNext: Fernando Ramos
Message 15 of 16 in “vimdiff: new implementation with layout support”
  1. 0/3 vimdiff: new implementation with layout supportFernando Ramos, Mar 27, 2022
  2. 1/3 vimdiff: new implementation with layout supportFernando Ramos, Mar 27, 2022
  3. Philippe BlainMar 27, 2022
  4. Fernando RamosMar 27, 2022
  5. Junio C HamanoMar 27, 2022
  6. 2/3 vimdiff: integrate layout tests in the unit tests framework ('t' folder)Fernando Ramos, Mar 27, 2022
  7. Junio C HamanoMar 27, 2022
  8. 3/3 vimdiff: add tool documentationFernando Ramos, Mar 27, 2022
  9. Philippe BlainMar 27, 2022
  10. fixup! vimdiff: add tool documentationPhilippe Blain, Mar 27, 2022
  11. Fernando RamosMar 27, 2022
  12. Junio C HamanoMar 27, 2022
  13. Fernando RamosMar 27, 2022
  14. Bagas SanjayaMar 28, 2022
  15. Junio C HamanoMar 28, 2022
  16. Fernando RamosMar 28, 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.