mirror of
https://github.com/macvim-dev/macvim.git
synced 2026-10-01 13:57:20 +02:00
Problem: filetype: .git-blame-ignore-revs file is not recognized
Solution: Detect .git-blame-ignore-revs file as gitrevlist filetype,
include syntax and filetype plugins (Fionn Fitzmaurice)
A Git revision list is
> a list of object names (i.e. one unabbreviated SHA-1 per line)...,
> comments (#), empty lines, and any leading and trailing whitespace are
> ignored.
(from Git's fsck.skipList documentation).
The default output of git rev-list will match this. It is also suitable
as input to git blame --ignore-revs-file.
This adds filetype detection matching .git-blame-ignore-revs files,
syntax highlighting and basic filetype settings.
closes: #20702
Signed-off-by: Fionn Fitzmaurice <fionn@github.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
18 lines
497 B
VimL
18 lines
497 B
VimL
" Vim syntax file
|
|
" Language: Git revision list
|
|
" Author: Fionn Fitzmaurice (github.com/fionn)
|
|
" Maintainer: Fionn Fitzmaurice (github.com/fionn)
|
|
" License: Vim & Apache 2.0
|
|
|
|
if exists("b:current_syntax")
|
|
finish
|
|
endif
|
|
|
|
syn match gitrevlistHash "\<\x\{40}\>\|\<\x\{64}\>" contains=@NoSpell nextgroup=gitrevlistComment skipwhite
|
|
syn match gitrevlistComment "#.*$"
|
|
|
|
hi def link gitrevlistHash Identifier
|
|
hi def link gitrevlistComment Comment
|
|
|
|
let b:current_syntax = "gitrevlist"
|