-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
reintegrate: add vim syntax highlighting
This will still involve some hoop-jumping to install, since Homebrew isn't really supposed to be used to add local Vim extensions. AFAICT, Vim doesn't have any patches under Homebrew that tell it to look for system-wide configurations under /usr/local/etc, so we can't just install things there (unlike bash_completion or zsh_completion). Instead, the idea at this point is to basically take the same approach as https://github.com/junegunn/fzf, where the brew formula has a caveat telling you how to add a custom path to Vim's runtimepath variable. All that means for this repo is that we have to make sure to bundle the vim syntax files in the release tarball. So besides the vim source itself, just have to amend the (ghetto) build script a little bit. Fixes #2.
- Loading branch information
Showing
3 changed files
with
38 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
autocmd BufNewFile,BufRead *.git/git-topics-reintegrate/todo.new | ||
\ setfiletype git-topics-reintegrate |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
" Vim syntax file | ||
" Language: git topics reintegrate | ||
" Maintainer: Alex Vondrak (https://github.com/ajvondrak) | ||
" Repository: https://github.com/ajvondrak/git-topics | ||
" | ||
" Based on the git rebase --interactive highlighting by Tim Pope: | ||
" https://github.com/vim/vim/blob/89bcfda/runtime/syntax/gitrebase.vim | ||
|
||
if exists("b:current_syntax") | ||
finish | ||
endif | ||
|
||
syn case match | ||
|
||
syn match reintegratePick "\v^p%(ick)=>" nextgroup=reintegrateTopic skipwhite | ||
syn match reintegrateDrop "\v^d%(rop)=>" nextgroup=reintegrateTopic skipwhite | ||
syn match reintegrateTopic ".*" contained | ||
syn match reintegrateComment "^#.*" | ||
|
||
hi def link reintegratePick Statement | ||
hi def link reintegrateDrop Comment | ||
hi def link reintegrateTopic Identifier | ||
hi def link reintegrateComment Comment | ||
|
||
let b:current_syntax = "git-topics-reintegrate" |