Skip to content

Commit

Permalink
Automatically wrap the body
Browse files Browse the repository at this point in the history
Fixes #52
  • Loading branch information
sonnyp committed Mar 17, 2022
1 parent 17c76ce commit 6605076
Show file tree
Hide file tree
Showing 21 changed files with 304 additions and 164 deletions.
1 change: 1 addition & 0 deletions .eslintignore
Original file line number Diff line number Diff line change
Expand Up @@ -3,3 +3,4 @@ install/
flatpak/
node_modules/
repo/
src/wordwrap.js
1 change: 1 addition & 0 deletions .prettierignore
Original file line number Diff line number Diff line change
Expand Up @@ -3,3 +3,4 @@ install/
flatpak/
node_modules/
repo/
src/wordwrap.js
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ Thank you for your help!

```sh
cd Commit
./re.sonny.Commit test/with-body/COMMIT_EDITMSG
./re.sonny.Commit --readonly test/with-body/COMMIT_EDITMSG
```

Make changes and hit `Ctrl+Shift+Q` on the Commit window to restart it.
Expand Down
4 changes: 4 additions & 0 deletions TODO.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,3 +15,7 @@
14. [ ] detect non imperative mood

https://tekin.co.uk/2020/03/git-commit-verbose-mode
https://robertcooper.me/post/git-commit-messages
https://www.freecodecamp.org/news/how-to-write-better-git-commit-messages/
https://wiki.gnome.org/Git/CommitMessages
https://cbea.ms/git-commit/
9 changes: 8 additions & 1 deletion data/re.sonny.Commit.gschema.xml
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,16 @@
<schema id="re.sonny.Commit" path="/re/sonny/Commit/">
<key name='title-length-hint' type='i'>
<default>50</default>
<range min="1" />
<range min="50" max="200" />
<summary>Message title length hint</summary>
</key>

<key name='body-length-wrap' type='i'>
<default>75</default>
<range min="72" max="200" />
<summary>Message body length wrap</summary>
</key>

<key name='dark-mode' type='b'>
<default>false</default>
<summary>Use dark mode</summary>
Expand Down
12 changes: 5 additions & 7 deletions data/re.sonny.Commit.metainfo.xml
Original file line number Diff line number Diff line change
Expand Up @@ -25,16 +25,13 @@
</p>
<p>Features:</p>
<ul>
<li>
Highlights overflow of title when it exceeds 50 characters
(customizable)
</li>
<li>Inserts blank line between title and description</li>
<li>Highlights overflow of the commit title</li>
<li>Automatically wraps the commit body</li>
<li>Inserts a blank line between title and body</li>
<!-- <li>Spell checking</li> -->
<li>Comments are readonly and excluded from "Select All"</li>
<li>Displays project folder and branch in window header</li>
<li>Dark mode support</li>
<li>Custom theme support</li>
<li>Keyboard navigation and shortcuts</li>
<li>Undo and redo support</li>
<li>Emoji picker</li>
Expand Down Expand Up @@ -97,8 +94,9 @@
<li>Add keyboard shortcuts for moving lines up and down</li>
<li>Highlight syntax for Git, Mercurial and diffs</li>
<li>Add a shortcuts window</li>
<li>Support for multiple comments</li>
<li>Support multiple comments</li>
<li>Auto capitalize the commit title</li>
<li>Automatically wrap commit message body</li>
<li>Various fixes</li>
</ul>
</description>
Expand Down
Loading

0 comments on commit 6605076

Please sign in to comment.