Commit
Commit copied to clipboard
Syntax hightlighting for interactive rebase
This is a nice feature that I miss from the Kate editor on KDE. When doing interactive rebase the action, hash and commit message are highlighted in different colors. It's a simple quality of life improvement. Here's a quick mock-up (with example colors):
Prior art in Kate text editor:
That's a nice idea.
Does kate uses different colors for pick
, drop
, reword
, ... ? If so can you post a screenshot.
Does kate uses different colors for
pick
,drop
,reword
, ... ? If so can you post a screenshot.
I hadn't noticed but indeed it uses different colors for some of the commands:
Commit now use GtkSourceView which has a powerful language spec system.
It doesn't have one for git but that should be reasonabily easy to do.
https://gitlab.gnome.org/GNOME/gtksourceview/-/tree/master/data/language-specs https://wiki.gnome.org/Projects/GtkSourceView/LanguageDefinitions https://builder.readthedocs.io/en/latest/plugins/editor/highlighting.html https://gnome.pages.gitlab.gnome.org/gtksourceview/gtksourceview5/lang-tutorial.html https://gnome.pages.gitlab.gnome.org/gtksourceview/gtksourceview5/lang-reference.html
Commit now has language definitions for git and hg
https://github.com/sonnyp/Commit/tree/main/src/language-specs
Should be quite straightforward to add support for git rebase syntax highlighting