Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
掘金者说
vscode
提交
1a854677
V
vscode
项目概览
掘金者说
/
vscode
与 Fork 源项目一致
从无法访问的项目Fork
通知
1
Star
0
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
DevOps
流水线
流水线任务
计划
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
V
vscode
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
DevOps
DevOps
流水线
流水线任务
计划
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
流水线任务
提交
Issue看板
体验新版 GitCode,发现更多精彩内容 >>
提交
1a854677
编写于
3月 11, 2016
作者:
B
Benjamin Pasero
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Add diff language mode for .diff and .patch files (fixes #3183)
上级
1371f241
变更
4
隐藏空白更改
内联
并排
Showing
4 changed file
with
315 addition
and
0 deletion
+315
-0
extensions/diff/OSSREADME.json
extensions/diff/OSSREADME.json
+13
-0
extensions/diff/diff.configuration.json
extensions/diff/diff.configuration.json
+11
-0
extensions/diff/package.json
extensions/diff/package.json
+23
-0
extensions/diff/syntaxes/diff.tmLanguage
extensions/diff/syntaxes/diff.tmLanguage
+268
-0
未找到文件。
extensions/diff/OSSREADME.json
0 → 100644
浏览文件 @
1a854677
//
ATTENTION
-
THIS
DIRECTORY
CONTAINS
THIRD
PARTY
OPEN
SOURCE
MATERIALS:
[{
"name"
:
"textmate/diff.tmbundle"
,
"version"
:
"0.0.0"
,
"license"
:
"TextMate Bundle License"
,
"repositoryURL"
:
"https://github.com/textmate/diff.tmbundle"
,
"licenseDetail"
:
[
"Permission to copy, use, modify, sell and distribute this"
,
"software is granted. This software is provided
\"
as is
\"
without"
,
"express or implied warranty, and with no claim as to its"
,
"suitability for any purpose."
]
}]
\ No newline at end of file
extensions/diff/diff.configuration.json
0 → 100644
浏览文件 @
1a854677
{
"comments"
:
{
"lineComment"
:
"//"
,
"blockComment"
:
[
"/*"
,
"*/"
]
},
"brackets"
:
[
[
"{"
,
"}"
],
[
"["
,
"]"
],
[
"("
,
")"
]
]
}
\ No newline at end of file
extensions/diff/package.json
0 → 100644
浏览文件 @
1a854677
{
"name"
:
"diff"
,
"version"
:
"0.1.0"
,
"publisher"
:
"vscode"
,
"engines"
:
{
"vscode"
:
"*"
},
"contributes"
:
{
"languages"
:
[
{
"id"
:
"diff"
,
"aliases"
:
[
"Diff"
,
"diff"
],
"extensions"
:
[
".patch"
,
".diff"
,
".rej"
],
"configuration"
:
"./diff.configuration.json"
}
],
"grammars"
:
[
{
"language"
:
"diff"
,
"scopeName"
:
"source.diff"
,
"path"
:
"./syntaxes/diff.tmLanguage"
}
]
}
}
\ No newline at end of file
extensions/diff/syntaxes/diff.tmLanguage
0 → 100644
浏览文件 @
1a854677
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist
version=
"1.0"
>
<dict>
<key>
fileTypes
</key>
<array>
<string>
patch
</string>
<string>
diff
</string>
<string>
rej
</string>
</array>
<key>
firstLineMatch
</key>
<string>
(?x)^
(===\ modified\ file
|==== \s* // .+ \s - \s .+ \s+ ====
|Index:\
|---\ [^%\n]
|\*\*\*.*\d{4}\s*$
|\d+(,\d+)* (a|d|c) \d+(,\d+)* $
|diff\ --git\
|commit\ [0-9a-f]{40}$
)
</string>
<key>
keyEquivalent
</key>
<string>
^~D
</string>
<key>
name
</key>
<string>
Diff
</string>
<key>
patterns
</key>
<array>
<dict>
<key>
captures
</key>
<dict>
<key>
1
</key>
<dict>
<key>
name
</key>
<string>
punctuation.definition.separator.diff
</string>
</dict>
</dict>
<key>
match
</key>
<string>
^((\*{15})|(={67})|(-{3}))$\n?
</string>
<key>
name
</key>
<string>
meta.separator.diff
</string>
</dict>
<dict>
<key>
match
</key>
<string>
^\d+(,\d+)*(a|d|c)\d+(,\d+)*$\n?
</string>
<key>
name
</key>
<string>
meta.diff.range.normal
</string>
</dict>
<dict>
<key>
captures
</key>
<dict>
<key>
1
</key>
<dict>
<key>
name
</key>
<string>
punctuation.definition.range.diff
</string>
</dict>
<key>
2
</key>
<dict>
<key>
name
</key>
<string>
meta.toc-list.line-number.diff
</string>
</dict>
<key>
3
</key>
<dict>
<key>
name
</key>
<string>
punctuation.definition.range.diff
</string>
</dict>
</dict>
<key>
match
</key>
<string>
^(@@)\s*(.+?)\s*(@@)($\n?)?
</string>
<key>
name
</key>
<string>
meta.diff.range.unified
</string>
</dict>
<dict>
<key>
captures
</key>
<dict>
<key>
3
</key>
<dict>
<key>
name
</key>
<string>
punctuation.definition.range.diff
</string>
</dict>
<key>
4
</key>
<dict>
<key>
name
</key>
<string>
punctuation.definition.range.diff
</string>
</dict>
<key>
6
</key>
<dict>
<key>
name
</key>
<string>
punctuation.definition.range.diff
</string>
</dict>
<key>
7
</key>
<dict>
<key>
name
</key>
<string>
punctuation.definition.range.diff
</string>
</dict>
</dict>
<key>
match
</key>
<string>
^(((\-{3}) .+ (\-{4}))|((\*{3}) .+ (\*{4})))$\n?
</string>
<key>
name
</key>
<string>
meta.diff.range.context
</string>
</dict>
<dict>
<key>
match
</key>
<string>
^diff --git a/.*$\n?
</string>
<key>
name
</key>
<string>
meta.diff.header.git
</string>
</dict>
<dict>
<key>
match
</key>
<string>
^diff (-|\S+\s+\S+).*$\n?
</string>
<key>
name
</key>
<string>
meta.diff.header.command
</string>
</dict>
<dict>
<key>
captures
</key>
<dict>
<key>
4
</key>
<dict>
<key>
name
</key>
<string>
punctuation.definition.from-file.diff
</string>
</dict>
<key>
6
</key>
<dict>
<key>
name
</key>
<string>
punctuation.definition.from-file.diff
</string>
</dict>
<key>
7
</key>
<dict>
<key>
name
</key>
<string>
punctuation.definition.from-file.diff
</string>
</dict>
</dict>
<key>
match
</key>
<string>
(^(((-{3}) .+)|((\*{3}) .+))$\n?|^(={4}) .+(?= - ))
</string>
<key>
name
</key>
<string>
meta.diff.header.from-file
</string>
</dict>
<dict>
<key>
captures
</key>
<dict>
<key>
2
</key>
<dict>
<key>
name
</key>
<string>
punctuation.definition.to-file.diff
</string>
</dict>
<key>
3
</key>
<dict>
<key>
name
</key>
<string>
punctuation.definition.to-file.diff
</string>
</dict>
<key>
4
</key>
<dict>
<key>
name
</key>
<string>
punctuation.definition.to-file.diff
</string>
</dict>
</dict>
<key>
match
</key>
<string>
(^(\+{3}) .+$\n?| (-) .* (={4})$\n?)
</string>
<key>
name
</key>
<string>
meta.diff.header.to-file
</string>
</dict>
<dict>
<key>
captures
</key>
<dict>
<key>
3
</key>
<dict>
<key>
name
</key>
<string>
punctuation.definition.inserted.diff
</string>
</dict>
<key>
6
</key>
<dict>
<key>
name
</key>
<string>
punctuation.definition.inserted.diff
</string>
</dict>
</dict>
<key>
match
</key>
<string>
^(((
>
)( .*)?)|((\+).*))$\n?
</string>
<key>
name
</key>
<string>
markup.inserted.diff
</string>
</dict>
<dict>
<key>
captures
</key>
<dict>
<key>
1
</key>
<dict>
<key>
name
</key>
<string>
punctuation.definition.inserted.diff
</string>
</dict>
</dict>
<key>
match
</key>
<string>
^(!).*$\n?
</string>
<key>
name
</key>
<string>
markup.changed.diff
</string>
</dict>
<dict>
<key>
captures
</key>
<dict>
<key>
3
</key>
<dict>
<key>
name
</key>
<string>
punctuation.definition.inserted.diff
</string>
</dict>
<key>
6
</key>
<dict>
<key>
name
</key>
<string>
punctuation.definition.inserted.diff
</string>
</dict>
</dict>
<key>
match
</key>
<string>
^(((
<
)( .*)?)|((-).*))$\n?
</string>
<key>
name
</key>
<string>
markup.deleted.diff
</string>
</dict>
<dict>
<key>
begin
</key>
<string>
^(#)
</string>
<key>
captures
</key>
<dict>
<key>
1
</key>
<dict>
<key>
name
</key>
<string>
punctuation.definition.comment.diff
</string>
</dict>
</dict>
<key>
comment
</key>
<string>
Git produces unified diffs with embedded comments"
</string>
<key>
end
</key>
<string>
\n
</string>
<key>
name
</key>
<string>
comment.line.number-sign.diff
</string>
</dict>
<dict>
<key>
match
</key>
<string>
^index [0-9a-f]{7,40}\.\.[0-9a-f]{7,40}.*$\n?
</string>
<key>
name
</key>
<string>
meta.diff.index.git
</string>
</dict>
<dict>
<key>
captures
</key>
<dict>
<key>
1
</key>
<dict>
<key>
name
</key>
<string>
punctuation.separator.key-value.diff
</string>
</dict>
<key>
2
</key>
<dict>
<key>
name
</key>
<string>
meta.toc-list.file-name.diff
</string>
</dict>
</dict>
<key>
match
</key>
<string>
^Index(:) (.+)$\n?
</string>
<key>
name
</key>
<string>
meta.diff.index
</string>
</dict>
<dict>
<key>
match
</key>
<string>
^Only in .*: .*$\n?
</string>
<key>
name
</key>
<string>
meta.diff.only-in
</string>
</dict>
</array>
<key>
scopeName
</key>
<string>
source.diff
</string>
<key>
uuid
</key>
<string>
7E848FF4-708E-11D9-97B4-0011242E4184
</string>
</dict>
</plist>
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录