Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
github
hub
提交
68210c84
H
hub
项目概览
github
/
hub
大约 1 年 前同步成功
通知
3
Star
22523
Fork
2406
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
H
hub
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
体验新版 GitCode,发现更多精彩内容 >>
未验证
提交
68210c84
编写于
12月 18, 2018
作者:
M
Mislav Marohnić
提交者:
GitHub
12月 18, 2018
浏览文件
操作
浏览文件
下载
差异文件
Merge pull request #1939 from dsifford/dsifford-vim-syntax
add pullrequest vim syntax.
上级
339efcd6
93dad322
变更
3
显示空白变更内容
内联
并排
Showing
3 changed file
with
39 addition
and
1 deletion
+39
-1
script/install.sh
script/install.sh
+1
-1
share/vim/vimfiles/ftdetect/pullrequest.vim
share/vim/vimfiles/ftdetect/pullrequest.vim
+1
-0
share/vim/vimfiles/syntax/pullrequest.vim
share/vim/vimfiles/syntax/pullrequest.vim
+37
-0
未找到文件。
script/install.sh
浏览文件 @
68210c84
...
...
@@ -16,7 +16,7 @@ fi
prefix
=
"
${
PREFIX
:-
$prefix
}
"
prefix
=
"
${
prefix
:-
/usr/local
}
"
for
src
in
bin/hub share/man/
*
/
*
.1
;
do
for
src
in
bin/hub share/man/
*
/
*
.1
share/vim/vimfiles/
*
/
*
.vim
;
do
dest
=
"
${
DESTDIR
}${
prefix
}
/
${
src
}
"
mkdir
-p
"
${
dest
%/*
}
"
[[
$src
==
share/
*
]]
&&
mode
=
"644"
||
mode
=
755
...
...
share/vim/vimfiles/ftdetect/pullrequest.vim
0 → 100644
浏览文件 @
68210c84
autocmd
BufNewFile
,
BufRead
PULLREQ_EDITMSG
set
filetype
=
pullrequest
share/vim/vimfiles/syntax/pullrequest.vim
0 → 100644
浏览文件 @
68210c84
" Vim syntax file
" Language: Hub Pull Request
" Maintainer: Derek Sifford <dereksifford@gmail.com>
" Filenames: *.git/PULLREQ_EDITMSG
" Latest Revision: 2018 Oct 30
if
exists
(
'b:current_syntax'
)
finish
endif
syn
case
match
syn
include
@Markdown
syntax
/markdown
.
vim
syn
match
pullreqBlank contained
"^.*"
contains
=
@Spell
syn
match
pullreqOverflow contained
".*"
contains
=
@Spell
syn
match
pullreqSummary contained
"^.\{0,50\}"
contains
=
@Spell nextgroup
=
pullreqOverflow
syn
match
pullreqMetaHeader contained
"^Changes:"
syn
match
pullreqSha contained
"^[a-z0-9]\{7\}\ze ("
nextgroup
=
pullreqCommitMeta
syn
match
pullreqCommitMeta contained skipnl skipwhite
".*"
nextgroup
=
pullreqCommitMessage
syn
match
pullreqCommitMessage contained
"^\s*\zs.*"
syn
match
pullreqBranchInfo contained
"\S\+:\S\+"
syn
region pullreqBranchInfoLine contained transparent start
=
"^Requesting a pull"
end
=
"$"
contains
=
pullreqBranchInfo
syn
region pullreqMessage keepend start
=
"^."
end
=
"^\ze# [-]* >8"
contains
=
@Markdown
,
@Spell nextgroup
=
pullreqMetadata
syn
region pullreqMetadata
fold
start
=
"^# [-]* >8 [-]*$"
end
=
"\%$"
contains
=
pullreqMetaHeader
,
pullreqSha
,
pullreqBranchInfoLine
syn
match
pullreqFirstLine skipnl
"\%^[^#].*"
contains
=
pullreqSummary nextgroup
=
pullreqBlank
hi
def
link pullreqBlank Error
hi
def
link pullreqBranchInfo Keyword
hi
def
link pullreqCommitMessage String
hi
def
link pullreqMetaHeader htmlH1
hi
def
link pullreqMetadata Comment
hi
def
link pullreqSha Constant
hi
def
link pullreqSummary Keyword
let
b:current_syntax
=
'pullrequest'
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录