runtime(jjdescription): Add highlighting for 'Renamed' status lines
Commit:
https://github.com/vim/vim/commit/f554a7c7090ea37a4437c7d27389ecb8a9069d6a
Author: Joël Stemmer <[email protected]>
Date: Thu Apr 9 19:32:15 2026 +0000
runtime(jjdescription): Add highlighting for 'Renamed' status lines
`jj status` output uses the 'R' prefix for renamed files.
closes: #19879
Signed-off-by: Joël Stemmer <[email protected]>
Signed-off-by: Gregory Anders <[email protected]>
Signed-off-by: Christian Brabandt <[email protected]>
diff --git a/runtime/syntax/jjdescription.vim b/runtime/syntax/jjdescription.vim
index 28e396f9f..f7b76ba26 100644
--- a/runtime/syntax/jjdescription.vim
+++ b/runtime/syntax/jjdescription.vim
@@ -4,6 +4,7 @@
" Last Change: 2024 May 8
" 2025 Apr 17 by Vim Project (don't require space to start comments, #17130)
" 2026 Apr 09 by Vim Project (anchor status regex to beginning of line, #19879)
+" 2026 Apr 09 by Vim Project (detect renames of files, #19879)
if exists('b:current_syntax')
finish
@@ -12,8 +13,9 @@ endif
syn match jjAdded "^JJ:\s\+\zsA\s.*" contained
syn match jjRemoved "^JJ:\s\+\zsD\s.*" contained
syn match jjChanged "^JJ:\s\+\zsM\s.*" contained
+syn match jjRenamed "^JJ:\s\+\zsR\s.*" contained
-syn region jjComment start="^JJ:" end="$" contains=jjAdded,jjRemoved,jjChanged
+syn region jjComment start="^JJ:" end="$"
contains=jjAdded,jjRemoved,jjChanged,jjRenamed
syn include @jjCommitDiff syntax/diff.vim
syn region jjCommitDiff start=/\%(^diff --\%(git\|cc\|combined\) \)\@=/
end=/^\%(diff --\|$\|@@\@!\|[^[:alnum:]\ +-]\S\@!\)\@=/ fold
contains=@jjCommitDiff
@@ -22,5 +24,6 @@ hi def link jjComment Comment
hi def link jjAdded Added
hi def link jjRemoved Removed
hi def link jjChanged Changed
+hi def link jjRenamed Changed
let b:current_syntax = 'jjdescription'
--
--
You received this message from the "vim_dev" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php
---
You received this message because you are subscribed to the Google Groups
"vim_dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To view this discussion visit
https://groups.google.com/d/msgid/vim_dev/E1wAvJI-00C8C0-4Q%40256bit.org.