summaryrefslogtreecommitdiffstats
path: root/runtime/syntax/gitrebase.vim
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-05-06 02:44:24 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-05-06 02:44:24 +0000
commit8baab3c8d7a6f22888bd581cd5c6098fd2e4b5a8 (patch)
tree3537e168b860f2742f6029d70501b5ed7d15d345 /runtime/syntax/gitrebase.vim
parentInitial commit. (diff)
downloadvim-8baab3c8d7a6f22888bd581cd5c6098fd2e4b5a8.tar.xz
vim-8baab3c8d7a6f22888bd581cd5c6098fd2e4b5a8.zip
Adding upstream version 2:8.1.0875.upstream/2%8.1.0875upstream
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'runtime/syntax/gitrebase.vim')
-rw-r--r--runtime/syntax/gitrebase.vim40
1 files changed, 40 insertions, 0 deletions
diff --git a/runtime/syntax/gitrebase.vim b/runtime/syntax/gitrebase.vim
new file mode 100644
index 0000000..a944c14
--- /dev/null
+++ b/runtime/syntax/gitrebase.vim
@@ -0,0 +1,40 @@
+" Vim syntax file
+" Language: git rebase --interactive
+" Maintainer: Tim Pope <vimNOSPAM@tpope.org>
+" Filenames: git-rebase-todo
+" Last Change: 2016 Aug 29
+
+if exists("b:current_syntax")
+ finish
+endif
+
+syn case match
+
+syn match gitrebaseHash "\v<\x{7,40}>" contained
+syn match gitrebaseCommit "\v<\x{7,40}>" nextgroup=gitrebaseSummary skipwhite
+syn match gitrebasePick "\v^p%(ick)=>" nextgroup=gitrebaseCommit skipwhite
+syn match gitrebaseReword "\v^r%(eword)=>" nextgroup=gitrebaseCommit skipwhite
+syn match gitrebaseEdit "\v^e%(dit)=>" nextgroup=gitrebaseCommit skipwhite
+syn match gitrebaseSquash "\v^s%(quash)=>" nextgroup=gitrebaseCommit skipwhite
+syn match gitrebaseFixup "\v^f%(ixup)=>" nextgroup=gitrebaseCommit skipwhite
+syn match gitrebaseExec "\v^%(x|exec)>" nextgroup=gitrebaseCommand skipwhite
+syn match gitrebaseDrop "\v^d%(rop)=>" nextgroup=gitrebaseCommit skipwhite
+syn match gitrebaseSummary ".*" contains=gitrebaseHash contained
+syn match gitrebaseCommand ".*" contained
+syn match gitrebaseComment "^#.*" contains=gitrebaseHash
+syn match gitrebaseSquashError "\v%^%(s%(quash)=>|f%(ixup)=>)" nextgroup=gitrebaseCommit skipwhite
+
+hi def link gitrebaseCommit gitrebaseHash
+hi def link gitrebaseHash Identifier
+hi def link gitrebasePick Statement
+hi def link gitrebaseReword Number
+hi def link gitrebaseEdit PreProc
+hi def link gitrebaseSquash Type
+hi def link gitrebaseFixup Special
+hi def link gitrebaseExec Function
+hi def link gitrebaseDrop Comment
+hi def link gitrebaseSummary String
+hi def link gitrebaseComment Comment
+hi def link gitrebaseSquashError Error
+
+let b:current_syntax = "gitrebase"