Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add 'vundlelog' filetype + settings/highlighting #633

Merged
merged 1 commit into from
Nov 5, 2015
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions autoload/vundle/scripts.vim
Original file line number Diff line number Diff line change
Expand Up @@ -124,6 +124,7 @@ func! s:view_changelog()
setl buftype=nofile
setl noswapfile
setl ro noma
setfiletype vundlelog

wincmd P | wincmd H
endf
Expand Down
15 changes: 15 additions & 0 deletions ftplugin/vundlelog.vim
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
" ---------------------------------------------------------------------------
" Standard ftplugin boilerplate; see ':help ftplugin'.
" ---------------------------------------------------------------------------
if exists("b:did_ftplugin")
finish
endif
let b:did_ftplugin = 1


" ---------------------------------------------------------------------------
" Settings for the Vundle update log buffer.
" ---------------------------------------------------------------------------
setlocal textwidth=0
setlocal nowrap
setlocal noswapfile
36 changes: 36 additions & 0 deletions syntax/vundlelog.vim
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
" ---------------------------------------------------------------------------
" Syntax highlighting for the line which identifies the plugin.
" ---------------------------------------------------------------------------
syntax match VundlePluginName '\v(^Updated Plugin: )@<=.*$'
highlight link VundlePluginName Keyword

" ---------------------------------------------------------------------------
" Syntax highlighting for the 'compare at' line of each plugin.
" ---------------------------------------------------------------------------
syntax region VundleCompareLine start='\v^Compare at: https:' end='\v\n'
\ contains=VundleCompareUrl
syntax match VundleCompareUrl '\vhttps:\S+'
highlight link VundleCompareLine Comment
highlight link VundleCompareUrl Underlined

" ---------------------------------------------------------------------------
" Syntax highlighting for individual commits.
" ---------------------------------------------------------------------------
" The main commit line.
" Note that this regex is intimately related to the one for VundleCommitTree,
" and the two should be changed in sync.
syntax match VundleCommitLine '\v(^ [|*]( *[\\|/\*])* )@<=[^*|].*$'
\ contains=VundleCommitMerge,VundleCommitUser,VundleCommitTime
highlight link VundleCommitLine String
" Sub-regions inside the commit message.
syntax match VundleCommitMerge '\v Merge pull request #\d+.*'
syntax match VundleCommitUser '\v( )@<=\S+( \S+)*(, \d+ \w+ ago$)@='
syntax match VundleCommitTime '\v(, )@<=\d+ \w+ ago$'
highlight link VundleCommitMerge Ignore
highlight link VundleCommitUser Identifier
highlight link VundleCommitTime Comment
" The git history DAG markers are outside of the main commit line region.
" Note that this regex is intimately related to the one for VundleCommitLine,
" and the two should be changed in sync.
syntax match VundleCommitTree '\v(^ )@<=[|*]( *[\\|/\*])*'
highlight link VundleCommitTree Label