Skip to content
| Marketplace
Sign in
Visual Studio Code>Programming Languages>Git Commit Message PlusNew to Visual Studio Code? Get it now.

Git Commit Message Plus

Johan Walles

|
8 installs
| (0) | Free
Improved Git commit message editing
Installation
Launch VS Code Quick Open (Ctrl+P), paste the following command, and press enter.
Copied to clipboard
More Info

CI Status

Git Commit Message Plus

A git commit message highlighter being nicer than the built-in one.

Highlighting inspiration from https://cbea.ms/git-commit.

Features

  • Inform about git commit -v if it isn't being used
  • Proper git commit -v diff highlighting even when running git in not-English.
  • Highlight file names and what's happening to them
  • Report > 72 characters subject lines as errors
  • Report > 50 characters subject lines as warnings
  • Report not-capitalized subject lines as errors (with Quick Fix)
  • Report errors for trailing punctuation
  • Report errors for non-blank second lines
  • Quick Fixes for certain diagnostics

Highlighted Git commit message

Internal

  • Comes with tests using https://github.com/PanAeon/vscode-tmgrammar-test
  • Comes with unit tests for the diagnostics

TODO

  • Highlight current branch name in the Git metadata
  • Mark commit message subject line with:
    • DONE: meta.scope.subject.git-commit
    • meta.scope.subject-after-50.git-commit from character 51 and onwards
    • meta.scope.subject-after-72.git-commit from character 73 and onwards
  • Validate code formatting in CI and fail on violations
  • Fail CI on linter warnings
  • Have unit tests that don't launch VSCode
  • Move all tests under the same top subdirectory

Development

To run the unit tests:

npm install && npm test

To install into VSCode:

  1. npm run package
  2. In VSCode:
    • Click Extensions
    • Click the ... menu in the top right corner
    • Click Install from VSIX...

To check highlighting in VSCode: "Developer: Inspect Editor Tokens and Scopes"

To publish a new version:

npm run publish
  • Contact us
  • Jobs
  • Privacy
  • Terms of use
  • Trademarks
© 2023 Microsoft