summaryrefslogtreecommitdiffstats
path: root/assets
diff options
context:
space:
mode:
authorPratik Munot <munotpratik20009@gmail.com>2024-10-29 21:34:47 -0700
committerPratik Munot <munotpratik20009@gmail.com>2024-10-29 21:34:47 -0700
commit50428443423a22685ec9f3ba8e4586a4ab419315 (patch)
treefb8be9c4c0ae7d4defa1eb039ffeb6dd40af57f1 /assets
parent649fb05c5859a2dca61bed165ba9965c0ac5a667 (diff)
Adding pipe delimeter support for csv files
Diffstat (limited to 'assets')
-rw-r--r--assets/syntaxes/02_Extra/CSV.sublime-syntax19
1 files changed, 9 insertions, 10 deletions
diff --git a/assets/syntaxes/02_Extra/CSV.sublime-syntax b/assets/syntaxes/02_Extra/CSV.sublime-syntax
index cca7cd2c..0ad17834 100644
--- a/assets/syntaxes/02_Extra/CSV.sublime-syntax
+++ b/assets/syntaxes/02_Extra/CSV.sublime-syntax
@@ -7,14 +7,14 @@ file_extensions:
- tsv
scope: text.csv
variables:
- field_separator: (?:[,;\t])
+ field_separator: (?:[,;|\t])
record_separator: (?:$\n?)
contexts:
prototype:
- match: (?={{record_separator}})
pop: true
fields:
- - match: ''
+ - match: ""
push:
- field_or_record_separator
- field4
@@ -26,15 +26,15 @@ contexts:
- field1
main:
- meta_include_prototype: false
- - match: '^'
+ - match: "^"
set: fields
field_or_record_separator:
- meta_include_prototype: false
- - match: '{{record_separator}}'
+ - match: "{{record_separator}}"
scope: punctuation.terminator.record.csv
pop: true
- - match: '{{field_separator}}'
+ - match: "{{field_separator}}"
scope: punctuation.separator.sequence.csv
pop: true
@@ -56,23 +56,22 @@ contexts:
pop: true
field1:
- - match: ''
+ - match: ""
set:
- meta_content_scope: meta.field-1.csv support.type
- include: field_contents
field2:
- - match: ''
+ - match: ""
set:
- meta_content_scope: meta.field-2.csv support.function
- include: field_contents
field3:
- - match: ''
+ - match: ""
set:
- meta_content_scope: meta.field-3.csv constant.numeric
- include: field_contents
field4:
- - match: ''
+ - match: ""
set:
- meta_content_scope: meta.field-4.csv keyword.operator
- include: field_contents
-