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

Re: [PATCH 7/9] vscode: use 8-space tabs, no trailing ws, etc for Git's source code

From
Johannes Schindelin <johannes.schindelin@gmx.de>
Date
Jul 30, 2018, 14:48 UTC
Message-ID
<nycvar.QRO.7.76.6.1807301646360.10478@tvgsbejvaqbjf.bet>
In-Reply-To
<88952ba5-9de4-9b32-2129-1cc83999db78@kdbg.org>
Hi Hannes,
On Wed, 25 Jul 2018, Johannes Sixt wrote:
Show 35 quoted lines
> Am 23.07.2018 um 15:52 schrieb Johannes Schindelin via GitGitGadget:
> > From: Johannes Schindelin <johannes.schindelin@gmx.de>
> > 
> > This adds a couple settings for the .c/.h files so that it is easier to
> > conform to Git's conventions while editing the source code.
> > 
> > Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
> > ---
> >   contrib/vscode/init.sh | 8 ++++++++
> >   1 file changed, 8 insertions(+)
> > 
> > diff --git a/contrib/vscode/init.sh b/contrib/vscode/init.sh
> > index face115e8..29f2a729d 100755
> > --- a/contrib/vscode/init.sh
> > +++ b/contrib/vscode/init.sh
> > @@ -21,6 +21,14 @@ cat >.vscode/settings.json.new <<\EOF ||
> >           "editor.wordWrap": "wordWrapColumn",
> >           "editor.wordWrapColumn": 72
> >       },
> > +    "[c]": {
> > +        "editor.detectIndentation": false,
> > +        "editor.insertSpaces": false,
> > +        "editor.tabSize": 8,
> > +        "editor.wordWrap": "wordWrapColumn",
> > +        "editor.wordWrapColumn": 80,
> > +        "files.trimTrailingWhitespace": true
> > +    },
> 
> I am a VS Code user, but I haven't used these settings before.
> 
> With these settings, does the editor break lines while I am typing? Or does it
> just insert a visual cue that tells where I should insert a line break? If the
> former, it would basically make the editor unusable for my taste. I want to
> have total control over the code I write. The 80 column limit is just a
> recommendation, not a hard requirement.

Fear not. It is giving you a very clear visual cue, but that's all. It does show the line wrapped, but the line number column quite clearly shows that it did not insert a new-line.

Ciao, Dscho

Show 9 quoted lines
> 
> >       "files.associations": {
> >           "*.h": "c",
> >           "*.c": "c"
> > 
> 
> -- Hannes
> 
> 
Previous: Johannes SixtNext: Johannes Schindelin via GitGitGadget
Message 19 of 29 in “Add support to develop Git in Visual Studio Code”
  1. 0/9 Add support to develop Git in Visual Studio CodeJohannes Schindelin via GitGitGadget, Jul 23, 2018
  2. 1/9 contrib: add a script to initialize VS Code configurationJohannes Schindelin via GitGitGadget, Jul 23, 2018
  3. Jonathan NiederJul 23, 2018
  4. Johannes SchindelinJul 30, 2018
  5. Junio C HamanoJul 23, 2018
  6. Junio C HamanoJul 23, 2018
  7. Johannes SchindelinJul 30, 2018
  8. 2/9 vscode: hard-code a couple definesJohannes Schindelin via GitGitGadget, Jul 23, 2018
  9. Jonathan NiederJul 23, 2018
  10. Johannes SchindelinJul 30, 2018
  11. 3/9 cache.h: extract enum declaration from inside a struct declarationJohannes Schindelin via GitGitGadget, Jul 23, 2018
  12. 4/9 mingw: define WIN32 explicitlyJohannes Schindelin via GitGitGadget, Jul 23, 2018
  13. 5/9 vscode: only overwrite C/C++ settingsJohannes Schindelin via GitGitGadget, Jul 23, 2018
  14. 6/9 vscode: wrap commit messages at column 72 by defaultJohannes Schindelin via GitGitGadget, Jul 23, 2018
  15. 8/9 vscode: add a dictionary for cSpellJohannes Schindelin via GitGitGadget, Jul 23, 2018
  16. 9/9 vscode: let cSpell work on commit messages, tooJohannes Schindelin via GitGitGadget, Jul 23, 2018
  17. 7/9 vscode: use 8-space tabs, no trailing ws, etc for Git's source codeJohannes Schindelin via GitGitGadget, Jul 23, 2018
  18. Johannes SixtJul 25, 2018
  19. Johannes SchindelinJul 30, 2018
  20. 0/9 Add support to develop Git in Visual Studio CodeJohannes Schindelin via GitGitGadget, Jul 30, 2018
  21. 2/9 vscode: hard-code a couple definesJohannes Schindelin via GitGitGadget, Jul 30, 2018
  22. 3/9 cache.h: extract enum declaration from inside a struct declarationJohannes Schindelin via GitGitGadget, Jul 30, 2018
  23. 1/9 contrib: add a script to initialize VS Code configurationJohannes Schindelin via GitGitGadget, Jul 30, 2018
  24. 5/9 vscode: only overwrite C/C++ settingsJohannes Schindelin via GitGitGadget, Jul 30, 2018
  25. 6/9 vscode: wrap commit messages at column 72 by defaultJohannes Schindelin via GitGitGadget, Jul 30, 2018
  26. 4/9 mingw: define WIN32 explicitlyJohannes Schindelin via GitGitGadget, Jul 30, 2018
  27. 7/9 vscode: use 8-space tabs, no trailing ws, etc for Git's source codeJohannes Schindelin via GitGitGadget, Jul 30, 2018
  28. 8/9 vscode: add a dictionary for cSpellJohannes Schindelin via GitGitGadget, Jul 30, 2018
  29. 9/9 vscode: let cSpell work on commit messages, tooJohannes Schindelin via GitGitGadget, Jul 30, 2018

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.