Highligt fixes/closes/resolves and other variations in commit messages
This piece of stupid vimscript will highlight pieces of commit message that will close github issues, and also what I regard as tags: [vim]
, or [scsi]
etc...
I couldn't get it to work with ft=gitcommit
, I'd love to learn how I can if possible.
au BufEnter COMMIT_EDITMSG
\ setf txt |
\ syntax match githubIssueSyntax
\ /\([Ff]ix\(e[sd]\)\?\|[Cc]lose[sd]\?\|[Rr]esolve[sd]\?\) #[0-9]\+/ |
\ highlight githubIssueSyntax ctermfg=red |
\ syntax match gitcommitTag /\[\w\+\]/ |
\ highlight gitcommitTag ctermfg=213
Written by Göktuğ Kayaalp
Related protips
Have a fresh tip? Share with Coderwall community!
Post
Post a tip
Best
#Github
Authors

projectcleverweb
289.2K

jjperezaguinaga
90.23K
Sponsored by #native_company# — Learn More
#native_title#
#native_desc#