From: Junio C Hamano <gitster@pobox.com>
To: "Derrick Stolee via GitGitGadget" <gitgitgadget@gmail.com>
Cc: git@vger.kernel.org, chakrabortyabhradeep79@gmail.com,
Derrick Stolee <derrickstolee@github.com>
Subject: Re: [PATCH] vscode: improve tab size and wrapping
Date: Mon, 27 Jun 2022 14:55:31 -0700 [thread overview]
Message-ID: <xmqq8rphojos.fsf@gitster.g> (raw)
In-Reply-To: <pull.1271.git.1656354587496.gitgitgadget@gmail.com> (Derrick Stolee via GitGitGadget's message of "Mon, 27 Jun 2022 18:29:47 +0000")
"Derrick Stolee via GitGitGadget" <gitgitgadget@gmail.com> writes:
> From: Derrick Stolee <derrickstolee@github.com>
>
> The contrib/vscode/init.sh script initializes the .vscode directory with
> some helpful metadata so VS Code handles Git code better.
>
> One big issue that VS Code has is detecting the tab width based on file
> type. ".txt" files were not covered by this script before, so add them
> with the appropriate tab widths. This prevents inserting spaces instead
> of tabs and keeps the tab width to eight instead of four or two.
>
> While we are here, remove the "editor.wordWrap" settings. The editor's
> word wrap is only cosmetic: it does not actually insert newlines when
> your typing goes over the column limit. This can make it appear like you
> have properly wrapped code, but it is incorrect. Further, existing code
> that is over the column limit is wrapped even if your editor window is
> wider than the limit. This can make reading such code more difficult.
> Without these lines, VS Code renders the lines accurately, without
> "ghost" newlines.
>
> Signed-off-by: Derrick Stolee <derrickstolee@github.com>
> ---
Nicely described and I found it very easy to understand the
reasoning behind every change, even though I am not a regular user
of the VS Code environment.
> Abhradeep was having similar issues, which drove me to actually submit
> the change.
>
> Thanks, -Stolee
Thanks, both.
>
> Published-As: https://github.com/gitgitgadget/git/releases/tag/pr-1271%2Fderrickstolee%2Fvscode-improvements-v1
> Fetch-It-Via: git fetch https://github.com/gitgitgadget/git pr-1271/derrickstolee/vscode-improvements-v1
> Pull-Request: https://github.com/gitgitgadget/git/pull/1271
>
> contrib/vscode/init.sh | 8 ++++++--
> 1 file changed, 6 insertions(+), 2 deletions(-)
>
> diff --git a/contrib/vscode/init.sh b/contrib/vscode/init.sh
> index f139fd86444..521d3037225 100755
> --- a/contrib/vscode/init.sh
> +++ b/contrib/vscode/init.sh
> @@ -25,8 +25,12 @@ cat >.vscode/settings.json.new <<\EOF ||
> "editor.detectIndentation": false,
> "editor.insertSpaces": false,
> "editor.tabSize": 8,
> - "editor.wordWrap": "wordWrapColumn",
> - "editor.wordWrapColumn": 80,
> + "files.trimTrailingWhitespace": true
> + },
> + "[txt]": {
> + "editor.detectIndentation": false,
> + "editor.insertSpaces": false,
> + "editor.tabSize": 8,
> "files.trimTrailingWhitespace": true
> },
> "files.associations": {
>
> base-commit: e4a4b31577c7419497ac30cebe30d755b97752c5
prev parent reply other threads:[~2022-06-27 22:09 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-06-27 18:29 [PATCH] vscode: improve tab size and wrapping Derrick Stolee via GitGitGadget
2022-06-27 21:55 ` Junio C Hamano [this message]
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=xmqq8rphojos.fsf@gitster.g \
--to=gitster@pobox.com \
--cc=chakrabortyabhradeep79@gmail.com \
--cc=derrickstolee@github.com \
--cc=git@vger.kernel.org \
--cc=gitgitgadget@gmail.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).