Commit icon indicating copy to clipboard operation
Commit copied to clipboard

Syntax hightlighting for interactive rebase

Open dragunoff opened this issue 3 years ago • 4 comments

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): image

Prior art in Kate text editor: image

dragunoff avatar Oct 18 '21 17:10 dragunoff

That's a nice idea.

Does kate uses different colors for pick, drop, reword, ... ? If so can you post a screenshot.

sonnyp avatar Oct 19 '21 08:10 sonnyp

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: image

dragunoff avatar Oct 19 '21 13:10 dragunoff

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

sonnyp avatar Jan 14 '22 00:01 sonnyp

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

sonnyp avatar Jan 15 '22 21:01 sonnyp