git@vger.kernel.org mailing list mirror (one of many)
 help / color / mirror / code / Atom feed
From: Philippe Blain <levraiphilippeblain@gmail.com>
To: Fernando Ramos <greenfoo@u92.eu>, git@vger.kernel.org
Cc: gitster@pobox.com, davvid@gmail.com, sunshine@sunshineco.com,
	seth@eseth.com, rogi@skylittlesystem.org
Subject: Re: [PATCH v6 1/3] vimdiff: new implementation with layout support
Date: Sun, 27 Mar 2022 12:47:57 -0400	[thread overview]
Message-ID: <00463195-5514-bf2b-e733-24e1e24a70cb@gmail.com> (raw)
In-Reply-To: <20220327112307.151044-2-greenfoo@u92.eu>

Hi Fernando,

Le 2022-03-27 à 07:23, Fernando Ramos a écrit :

--8<--

> +################################################################################
> +## Internal functions (not meant to be used outside this script)
> +################################################################################
> +
> +debug_print () { 
> +	# Send message to stderr if global variable DEBUG is set to "true"

This should also be GIT_MERGETOOL_VIMDIFF_DEBUG, right?

> +
> +	if test -n "$GIT_MERGETOOL_VIMDIFF_DEBUG"
> +	then
> +		>&2 echo "$@"
> +	fi
> +}
> +

--8<--

> +gen_cmd () {
> +	# This function returns (in global variable FINAL_CMD) the string that
> +	# you can use when invoking "vim" (as shown next) to obtain a given
> +	# layout:
> +	#
> +	#   $ vim -f $FINAL_CMD "$LOCAL" "$BASE" "$REMOTE" "$MERGED"
> +	#
> +	# It takes one single argument: a string containing the desired layout
> +	# definition.
> +	#
> +	# The syntax of the "layout definitions" is explained in ... (TODO)...

Is this still TODO ?

> +	# but you can already intuitively understand how it works by knowing
> +	# that...
> +	#
> +	#   * ";" means "a new vim tab"
> +	#   * "-" means "a new vim horizontal split"
> +	#   * "|" means "a new vim vertical split"
> +	#
> +	# It also returns (in global variable FINAL_TARGET) the name ("LOCAL",
> +	# "BASE", "REMOTE" or "MERGED") of the file that is marked with an "@",
> +	# or "MERGED" if none of them is.
> +	#
> +	# Example:
> +	#
> +	#     gen_cmd "@LOCAL , REMOTE"
> +	#     |
> +	#     `-> FINAL_CMD    == "-c \"echo | vertical split | 1b | wincmd l | 3b | tabdo windo diffthis\" -c \"tabfirst\""
> +	#         FINAL_TARGET == "LOCAL"

  reply	other threads:[~2022-03-27 16:48 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-03-27 11:23 [PATCH v6 0/3] vimdiff: new implementation with layout support Fernando Ramos
2022-03-27 11:23 ` [PATCH v6 1/3] " Fernando Ramos
2022-03-27 16:47   ` Philippe Blain [this message]
2022-03-27 18:12     ` Fernando Ramos
2022-03-27 21:36   ` Junio C Hamano
2022-03-27 11:23 ` [PATCH v6 2/3] vimdiff: integrate layout tests in the unit tests framework ('t' folder) Fernando Ramos
2022-03-27 21:37   ` Junio C Hamano
2022-03-27 11:23 ` [PATCH v6 3/3] vimdiff: add tool documentation Fernando Ramos
2022-03-27 18:28   ` Philippe Blain
2022-03-27 18:50     ` [PATCH] fixup! " Philippe Blain
2022-03-27 21:10     ` [PATCH v6 3/3] " Fernando Ramos
2022-03-27 21:43       ` Junio C Hamano
2022-03-27 22:17         ` Fernando Ramos
2022-03-28  4:48   ` Bagas Sanjaya
2022-03-28  5:43     ` Junio C Hamano
2022-03-28 19:19       ` Fernando Ramos

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: http://vger.kernel.org/majordomo-info.html

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=00463195-5514-bf2b-e733-24e1e24a70cb@gmail.com \
    --to=levraiphilippeblain@gmail.com \
    --cc=davvid@gmail.com \
    --cc=git@vger.kernel.org \
    --cc=gitster@pobox.com \
    --cc=greenfoo@u92.eu \
    --cc=rogi@skylittlesystem.org \
    --cc=seth@eseth.com \
    --cc=sunshine@sunshineco.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://80x24.org/mirrors/git.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).