我不知道如何突出显示尾随空格,但你可以通过去除它
Bundles - > Text - > Converting/Stripping - >删除文档中的尾随空格
此外,因为textmate有emacs绑定,你可以像在emacs中那样做.
小智 5
此代码有效(但没有评论):
{ scopeName = 'source.whitespace';
patterns = (
{ name = 'source.invalid.trailing-whitespace';
match = '(\s+)$';
captures = { 1 = { name = 'invalid.trailing-whitespace'; }; };
},
);
}
Run Code Online (Sandbox Code Playgroud)
PS:我已将"source"更改为"source.whitespace"
对于Python语法中的注释更改:
{ name = 'comment.line.number-sign.python';
match = '(#).*$\n?';
captures = { 1 = { name = 'punctuation.definition.comment.python'; }; };
},
Run Code Online (Sandbox Code Playgroud)
在:
{ name = 'comment.line.number-sign.python';
match = '(#).*?(\s*)$\n?';
captures = {
1 = { name = 'punctuation.definition.comment.python'; };
2 = { name = 'invalid.trailing-whitespace'; };
};
},
Run Code Online (Sandbox Code Playgroud)
您需要在Python语言定义中添加"include",其中:
:
patterns = (
{ name = 'comment.line.number-sign.python';
:
Run Code Online (Sandbox Code Playgroud)
转向:
:
patterns = (
{ include = 'source.whitespace'; },
{ name = 'comment.line.number-sign.python';
:
Run Code Online (Sandbox Code Playgroud)
| 归档时间: |
|
| 查看次数: |
1985 次 |
| 最近记录: |