mirror of https://github.com/sharkdp/bat
Merge branch 'master' into feature/dark_plus_theme
commit
aa442b5795
@ -0,0 +1,18 @@
|
|||||||
|
version: 2
|
||||||
|
updates:
|
||||||
|
- package-ecosystem: cargo
|
||||||
|
directory: "/"
|
||||||
|
schedule:
|
||||||
|
interval: monthly
|
||||||
|
time: "04:00"
|
||||||
|
timezone: Europe/Berlin
|
||||||
|
ignore:
|
||||||
|
- dependency-name: git2
|
||||||
|
versions:
|
||||||
|
- 0.13.17
|
||||||
|
- package-ecosystem: gitsubmodule
|
||||||
|
directory: "/"
|
||||||
|
schedule:
|
||||||
|
interval: monthly
|
||||||
|
time: "04:00"
|
||||||
|
timezone: Europe/Berlin
|
@ -1 +0,0 @@
|
|||||||
Subproject commit 4786d037a761bc45e516f6b0624a839919ec6d05
|
|
@ -1,46 +1,78 @@
|
|||||||
%YAML 1.2
|
%YAML 1.2
|
||||||
---
|
---
|
||||||
# http://www.sublimetext.com/docs/3/syntax.html
|
# See http://www.sublimetext.com/docs/3/syntax.html
|
||||||
name: Advanced CSV
|
name: Comma Separated Values
|
||||||
file_extensions:
|
file_extensions:
|
||||||
- csv
|
- csv
|
||||||
- tsv
|
- tsv
|
||||||
scope: text.advanced_csv
|
scope: text.csv
|
||||||
|
variables:
|
||||||
|
field_separator: (?:[,;\t])
|
||||||
|
record_separator: (?:$\n?)
|
||||||
contexts:
|
contexts:
|
||||||
main:
|
prototype:
|
||||||
- match: (\")
|
- match: (?={{record_separator}})
|
||||||
captures:
|
|
||||||
1: string.quoted.double.advanced_csv
|
|
||||||
push:
|
|
||||||
- meta_scope: meta.quoted.advanced_csv
|
|
||||||
- match: (\")
|
|
||||||
captures:
|
|
||||||
1: string.quoted.double.advanced_csv
|
|
||||||
pop: true
|
pop: true
|
||||||
- include: main
|
fields:
|
||||||
- match: '(\[([+-]?\d*)(\:)?([+-]?\d*)(\,)?([+-]?\d*)(\:)?([+-]?\d*)\])?\s*([<>v^])?\s*(=)'
|
- match: ''
|
||||||
captures:
|
|
||||||
1: keyword.operator.advanced_csv
|
|
||||||
2: constant.numeric.formula.advanced_csv
|
|
||||||
4: constant.numeric.formula.advanced_csv
|
|
||||||
6: constant.numeric.formula.advanced_csv
|
|
||||||
8: constant.numeric.formula.advanced_csv
|
|
||||||
9: keyword.operator.advanced_csv
|
|
||||||
10: keyword.operator.advanced_csv
|
|
||||||
push:
|
push:
|
||||||
- meta_scope: meta.range.advanced_csv
|
- field_or_record_separator
|
||||||
- match: (?=(\")|$)
|
- field4
|
||||||
|
- field_or_record_separator
|
||||||
|
- field3
|
||||||
|
- field_or_record_separator
|
||||||
|
- field2
|
||||||
|
- field_or_record_separator
|
||||||
|
- field1
|
||||||
|
main:
|
||||||
|
- meta_include_prototype: false
|
||||||
|
- match: '^'
|
||||||
|
set: fields
|
||||||
|
|
||||||
|
field_or_record_separator:
|
||||||
|
- meta_include_prototype: false
|
||||||
|
- match: '{{record_separator}}'
|
||||||
|
scope: punctuation.terminator.record.csv
|
||||||
|
pop: true
|
||||||
|
- match: '{{field_separator}}'
|
||||||
|
scope: punctuation.separator.sequence.csv
|
||||||
|
pop: true
|
||||||
|
|
||||||
|
field_contents:
|
||||||
|
- match: '"'
|
||||||
|
scope: punctuation.definition.string.begin.csv
|
||||||
|
push: double_quoted_string
|
||||||
|
|
||||||
|
- match: (?={{field_separator}}|{{record_separator}})
|
||||||
|
pop: true
|
||||||
|
|
||||||
|
double_quoted_string:
|
||||||
|
- meta_include_prototype: false
|
||||||
|
- meta_scope: string.quoted.double.csv
|
||||||
|
- match: '""'
|
||||||
|
scope: constant.character.escape.csv
|
||||||
|
- match: '"'
|
||||||
|
scope: punctuation.definition.string.end.csv
|
||||||
pop: true
|
pop: true
|
||||||
- include: scope:source.python
|
|
||||||
- match: '(?<=^|,|\s|\")([0-9.eE+-]+)(?=$|,|\s|\")'
|
field1:
|
||||||
scope: meta.number.advanced_csv
|
- match: ''
|
||||||
captures:
|
set:
|
||||||
1: constant.numeric.advanced_csv
|
- meta_content_scope: meta.field-1.csv support.type
|
||||||
- match: '(?<=^|,|\s|\")([^, \t\"]+)(?=$|,|\s|\")'
|
- include: field_contents
|
||||||
scope: meta.nonnumber.advanced_csv
|
field2:
|
||||||
captures:
|
- match: ''
|
||||||
1: storage.type.advanced_csv
|
set:
|
||||||
- match: (\,)
|
- meta_content_scope: meta.field-2.csv support.function
|
||||||
scope: meta.delimiter.advanced_csv
|
- include: field_contents
|
||||||
captures:
|
field3:
|
||||||
1: keyword.operator.advanced_csv
|
- match: ''
|
||||||
|
set:
|
||||||
|
- meta_content_scope: meta.field-3.csv constant.numeric
|
||||||
|
- include: field_contents
|
||||||
|
field4:
|
||||||
|
- match: ''
|
||||||
|
set:
|
||||||
|
- meta_content_scope: meta.field-4.csv keyword.operator
|
||||||
|
- include: field_contents
|
||||||
|
|
||||||
|
@ -1 +1 @@
|
|||||||
Subproject commit 45a1b6fe6cc37a2b614ae199d85c702b8711e22a
|
Subproject commit cc13e7d4ef74a6556af09d8858d2cc6a47ef5451
|
@ -1 +1 @@
|
|||||||
Subproject commit 4868322030c3644d6b8cfff68c85849789d9bdb2
|
Subproject commit 63819a1ab6b2075360933b2cfe41b416de0e3c26
|
@ -0,0 +1,60 @@
|
|||||||
|
# SYNTAX TEST "CSV.sublime-syntax"
|
||||||
|
Forename,Surname,House No.,Street,City,Postcode
|
||||||
|
#^^^^^^^ meta.field-1
|
||||||
|
# ^ punctuation.separator.sequence
|
||||||
|
# ^^^^^^^ meta.field-2
|
||||||
|
# ^ punctuation.separator.sequence
|
||||||
|
# ^^^^^^^^^ meta.field-3
|
||||||
|
# ^ punctuation.separator.sequence
|
||||||
|
# ^^^^^^ meta.field-4
|
||||||
|
# ^ punctuation.separator.sequence
|
||||||
|
# ^^^^ meta.field-1
|
||||||
|
# ^ punctuation.separator.sequence
|
||||||
|
# ^^^^^^^^ meta.field-2
|
||||||
|
John,Doe,87,Logon Road,Citiville,TU43 6GH
|
||||||
|
#^^^ meta.field-1
|
||||||
|
# ^ punctuation.separator.sequence
|
||||||
|
# ^^^ meta.field-2
|
||||||
|
# ^ punctuation.separator.sequence
|
||||||
|
# ^^ meta.field-3
|
||||||
|
# ^ punctuation.separator.sequence
|
||||||
|
# ^^^^^^^^^^ meta.field-4
|
||||||
|
# ^ punctuation.separator.sequence
|
||||||
|
# ^^^^^^^^^ meta.field-1
|
||||||
|
# ^ punctuation.separator.sequence
|
||||||
|
# ^^^^^^^^ meta.field-2
|
||||||
|
Jane,Doe,22,"""Fun"" Street","The City, County",FA90 1XA
|
||||||
|
#^^^ meta.field-1
|
||||||
|
# ^ punctuation.separator.sequence
|
||||||
|
# ^^^ meta.field-2
|
||||||
|
# ^ punctuation.separator.sequence
|
||||||
|
# ^^ meta.field-3
|
||||||
|
# ^ punctuation.separator.sequence
|
||||||
|
# ^^^^^^^^^^^^^^^^ meta.field-4 string.quoted.double
|
||||||
|
# ^^ constant.character.escape
|
||||||
|
# ^^ constant.character.escape
|
||||||
|
# ^ punctuation.separator.sequence
|
||||||
|
# ^ meta.field-1 string.quoted.double punctuation.definition.string.begin
|
||||||
|
# ^^^^^^^^^^^^^^^^^ meta.field-1 string.quoted.double
|
||||||
|
# ^ meta.field-1 string.quoted.double punctuation.definition.string.end
|
||||||
|
# ^ punctuation.separator.sequence
|
||||||
|
# ^^^^^^^^ meta.field-2
|
||||||
|
Fred,Bloggs,"19","Street
|
||||||
|
#^^^ meta.field-1
|
||||||
|
# ^ punctuation.separator.sequence
|
||||||
|
# ^^^^^^ meta.field-2
|
||||||
|
# ^ punctuation.separator.sequence
|
||||||
|
# ^^^ meta.field-3 string.quoted.double
|
||||||
|
# ^ punctuation.separator.sequence
|
||||||
|
# ^ meta.field-4 punctuation.definition.string.begin
|
||||||
|
# ^^^^^^^^ meta.field-4 string.quoted.double
|
||||||
|
Spanning Multiple ""
|
||||||
|
#^^^^^^^^^^^^^^^^^^^^ meta.field-4 string.quoted.double
|
||||||
|
# ^^ constant.character.escape
|
||||||
|
Lines",Citee,P0stc0d3
|
||||||
|
#^^^^^ meta.field-4 string.quoted.double
|
||||||
|
# ^ meta.field-4 punctuation.definition.string.end
|
||||||
|
# ^ punctuation.separator.sequence
|
||||||
|
# ^^^^^ meta.field-1
|
||||||
|
# ^ punctuation.separator.sequence
|
||||||
|
# ^^^^^^^^ meta.field-2
|
Can't render this file because it contains an unexpected character in line 1 and column 15.
|
@ -0,0 +1,60 @@
|
|||||||
|
# SYNTAX TEST "CSV.sublime-syntax"
|
||||||
|
Forename Surname House No. Street City Postcode
|
||||||
|
#^^^^^^^ meta.field-1
|
||||||
|
# ^ punctuation.separator.sequence
|
||||||
|
# ^^^^^^^ meta.field-2
|
||||||
|
# ^ punctuation.separator.sequence
|
||||||
|
# ^^^^^^^^^ meta.field-3
|
||||||
|
# ^ punctuation.separator.sequence
|
||||||
|
# ^^^^^^ meta.field-4
|
||||||
|
# ^ punctuation.separator.sequence
|
||||||
|
# ^^^^ meta.field-1
|
||||||
|
# ^ punctuation.separator.sequence
|
||||||
|
# ^^^^^^^^ meta.field-2
|
||||||
|
John Doe 87 Logon Road Citiville TU43 6GH
|
||||||
|
#^^^ meta.field-1
|
||||||
|
# ^ punctuation.separator.sequence
|
||||||
|
# ^^^ meta.field-2
|
||||||
|
# ^ punctuation.separator.sequence
|
||||||
|
# ^^ meta.field-3
|
||||||
|
# ^ punctuation.separator.sequence
|
||||||
|
# ^^^^^^^^^^ meta.field-4
|
||||||
|
# ^ punctuation.separator.sequence
|
||||||
|
# ^^^^^^^^^ meta.field-1
|
||||||
|
# ^ punctuation.separator.sequence
|
||||||
|
# ^^^^^^^^ meta.field-2
|
||||||
|
Jane Doe 22 """Fun"" Street" "The City County" FA90 1XA
|
||||||
|
#^^^ meta.field-1
|
||||||
|
# ^ punctuation.separator.sequence
|
||||||
|
# ^^^ meta.field-2
|
||||||
|
# ^ punctuation.separator.sequence
|
||||||
|
# ^^ meta.field-3
|
||||||
|
# ^ punctuation.separator.sequence
|
||||||
|
# ^^^^^^^^^^^^^^^^ meta.field-4 string.quoted.double
|
||||||
|
# ^^ constant.character.escape
|
||||||
|
# ^^ constant.character.escape
|
||||||
|
# ^ punctuation.separator.sequence
|
||||||
|
# ^ meta.field-1 string.quoted.double punctuation.definition.string.begin
|
||||||
|
# ^^^^^^^^^^^^^^^^^ meta.field-1 string.quoted.double
|
||||||
|
# ^ meta.field-1 string.quoted.double punctuation.definition.string.end
|
||||||
|
# ^ punctuation.separator.sequence
|
||||||
|
# ^^^^^^^^ meta.field-2
|
||||||
|
Fred Bloggs "19" "Street
|
||||||
|
#^^^ meta.field-1
|
||||||
|
# ^ punctuation.separator.sequence
|
||||||
|
# ^^^^^^ meta.field-2
|
||||||
|
# ^ punctuation.separator.sequence
|
||||||
|
# ^^^ meta.field-3 string.quoted.double
|
||||||
|
# ^ punctuation.separator.sequence
|
||||||
|
# ^ meta.field-4 punctuation.definition.string.begin
|
||||||
|
# ^^^^^^^^ meta.field-4 string.quoted.double
|
||||||
|
Spanning Multiple ""
|
||||||
|
#^^^^^^^^^^^^^^^^^^^^ meta.field-4 string.quoted.double
|
||||||
|
# ^^ constant.character.escape
|
||||||
|
Lines" Citee P0stc0d3
|
||||||
|
#^^^^^ meta.field-4 string.quoted.double
|
||||||
|
# ^ meta.field-4 punctuation.definition.string.end
|
||||||
|
# ^ punctuation.separator.sequence
|
||||||
|
# ^^^^^ meta.field-1
|
||||||
|
# ^ punctuation.separator.sequence
|
||||||
|
# ^^^^^^^^ meta.field-2
|
Can't render this file because it contains an unexpected character in line 1 and column 15.
|
Can't render this file because it contains an unexpected character in line 2 and column 276.
|
Loading…
Reference in New Issue