mirror of
https://github.com/sharkdp/bat.git
synced 2024-11-07 08:24:21 +01:00
Add support for "etc/hosts" files.
- Syntax author: https://github.com/brandonwamboldt/sublime-hosts Since the upstream version only has a tmLanguage, added a sublime-syntax file manually.
This commit is contained in:
parent
e9210c0f6c
commit
69fc1caead
3
.gitmodules
vendored
3
.gitmodules
vendored
@ -135,3 +135,6 @@
|
||||
[submodule "assets/syntaxes/DotENV"]
|
||||
path = assets/syntaxes/DotENV
|
||||
url = https://github.com/zaynali53/DotENV
|
||||
[submodule "assets/syntaxes/hosts"]
|
||||
path = assets/syntaxes/hosts
|
||||
url = https://github.com/brandonwamboldt/sublime-hosts
|
||||
|
23
assets/syntaxes/Hosts.sublime-syntax
vendored
Normal file
23
assets/syntaxes/Hosts.sublime-syntax
vendored
Normal file
@ -0,0 +1,23 @@
|
||||
%YAML 1.2
|
||||
---
|
||||
# http://www.sublimetext.com/docs/3/syntax.html
|
||||
name: hosts
|
||||
file_extensions:
|
||||
- hosts
|
||||
scope: source.hosts
|
||||
|
||||
contexts:
|
||||
main:
|
||||
- scope: comment.line.number-sign
|
||||
match: \#.*
|
||||
comment: comment
|
||||
|
||||
- match: ^\s*([0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}|[0-9a-f:]+)
|
||||
comment: ipaddress
|
||||
scope: constant.numeric.ipaddress
|
||||
|
||||
|
||||
- match: \s(localhost|ip6-loopback|ip6-localhost|ip6-localnet|ip6-mcastprefix|ip6-allnodes|ip6-allrouters|ip6-allhosts|broadcasthost)\b
|
||||
scope: keyword.host.predefined}
|
||||
comment: prefdfined
|
||||
|
1
assets/syntaxes/hosts
vendored
Submodule
1
assets/syntaxes/hosts
vendored
Submodule
@ -0,0 +1 @@
|
||||
Subproject commit 21250a7117655b0525821237b98b882dcc231350
|
Loading…
Reference in New Issue
Block a user