Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

[NEW] Initial commit of Tabular bundle, with CSV, TSV grammars

git-svn-id: http://svn.textmate.org/trunk/Bundles/Tabular.tmbundle@5259 dfb7d73b-c2ec-0310-8fea-fb051d288c6d
commit 55f437c15510451427f25c8890f049a65e3f0615 0 parents
@jrus jrus authored
Showing with 328 additions and 0 deletions.
  1. +178 −0 Syntaxes/CSV.tmLanguage
  2. +135 −0 Syntaxes/TSV.tmLanguage
  3. +15 −0 info.plist
178 Syntaxes/CSV.tmLanguage
@@ -0,0 +1,178 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
+<plist version="1.0">
+<dict>
+ <key>fileTypes</key>
+ <array>
+ <string>csv</string>
+ </array>
+ <key>keyEquivalent</key>
+ <string>^~C</string>
+ <key>name</key>
+ <string>CSV</string>
+ <key>patterns</key>
+ <array>
+ <dict>
+ <key>include</key>
+ <string>#table</string>
+ </dict>
+ </array>
+ <key>repository</key>
+ <dict>
+ <key>field</key>
+ <dict>
+ <key>patterns</key>
+ <array>
+ <dict>
+ <key>begin</key>
+ <string>(^|(?&lt;=,))(")</string>
+ <key>beginCaptures</key>
+ <dict>
+ <key>2</key>
+ <dict>
+ <key>name</key>
+ <string>punctuation.definition.field.csv</string>
+ </dict>
+ </dict>
+ <key>comment</key>
+ <string>
+ this field uses "s and is thus able to enclose
+ newlines or commas
+ </string>
+ <key>contentName</key>
+ <string>meta.tabular.field.quoted.csv</string>
+ <key>end</key>
+ <string>(")($|(,))</string>
+ <key>endCaptures</key>
+ <dict>
+ <key>1</key>
+ <dict>
+ <key>name</key>
+ <string>punctuation.definition.field.csv</string>
+ </dict>
+ <key>3</key>
+ <dict>
+ <key>name</key>
+ <string>punctuation.separator.tabular.field.csv</string>
+ </dict>
+ </dict>
+ <key>patterns</key>
+ <array>
+ <dict>
+ <key>match</key>
+ <string>""</string>
+ <key>name</key>
+ <string>constant.character.escape.straight-quote.csv</string>
+ </dict>
+ </array>
+ </dict>
+ <dict>
+ <key>begin</key>
+ <string>(:^|(?&lt;=,))(?!$|,)</string>
+ <key>contentName</key>
+ <string>meta.tabular.field.csv</string>
+ <key>end</key>
+ <string>$|(,)</string>
+ <key>endCaptures</key>
+ <dict>
+ <key>1</key>
+ <dict>
+ <key>name</key>
+ <string>punctuation.separator.tabular.field.csv</string>
+ </dict>
+ </dict>
+ </dict>
+ <dict>
+ <key>match</key>
+ <string>,</string>
+ <key>name</key>
+ <string>punctuation.separator.tabular.field.csv</string>
+ </dict>
+ </array>
+ </dict>
+ <key>header</key>
+ <dict>
+ <key>begin</key>
+ <string>^(?!$)</string>
+ <key>end</key>
+ <string>$</string>
+ <key>name</key>
+ <string>meta.tabular.row.header.csv</string>
+ <key>patterns</key>
+ <array>
+ <dict>
+ <key>include</key>
+ <string>#field</string>
+ </dict>
+ </array>
+ </dict>
+ <key>row</key>
+ <dict>
+ <key>begin</key>
+ <string>^(?!$)</string>
+ <key>end</key>
+ <string>$</string>
+ <key>name</key>
+ <string>meta.tabular.row.csv</string>
+ <key>patterns</key>
+ <array>
+ <dict>
+ <key>include</key>
+ <string>#field</string>
+ </dict>
+ </array>
+ </dict>
+ <key>table</key>
+ <dict>
+ <key>begin</key>
+ <string>^</string>
+ <key>end</key>
+ <string>^$not possible$^</string>
+ <key>name</key>
+ <string>meta.tabular.table.csv</string>
+ <key>patterns</key>
+ <array>
+ <dict>
+ <key>include</key>
+ <string>#header</string>
+ </dict>
+ <dict>
+ <key>begin</key>
+ <string>(\n)</string>
+ <key>beginCaptures</key>
+ <dict>
+ <key>1</key>
+ <dict>
+ <key>name</key>
+ <string>punctuation.separator.table.row.csv</string>
+ </dict>
+ </dict>
+ <key>comment</key>
+ <string>
+ everything after the first row is not a header
+ </string>
+ <key>end</key>
+ <string>^$not possible$^</string>
+ <key>patterns</key>
+ <array>
+ <dict>
+ <key>include</key>
+ <string>#row</string>
+ </dict>
+ <dict>
+ <key>match</key>
+ <string>\n</string>
+ <key>name</key>
+ <string>punctuation.separator.table.row.csv</string>
+ </dict>
+ </array>
+ </dict>
+ </array>
+ </dict>
+ </dict>
+ <key>scopeName</key>
+ <string>text.tabular.csv</string>
+ <key>uuid</key>
+ <string>B0691F9F-D279-48CB-8959-2C9426579002</string>
+</dict>
+</plist>
135 Syntaxes/TSV.tmLanguage
@@ -0,0 +1,135 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
+<plist version="1.0">
+<dict>
+ <key>fileTypes</key>
+ <array>
+ <string>tsv</string>
+ </array>
+ <key>keyEquivalent</key>
+ <string>^~T</string>
+ <key>name</key>
+ <string>TSV</string>
+ <key>patterns</key>
+ <array>
+ <dict>
+ <key>include</key>
+ <string>#table</string>
+ </dict>
+ </array>
+ <key>repository</key>
+ <dict>
+ <key>field</key>
+ <dict>
+ <key>patterns</key>
+ <array>
+ <dict>
+ <key>begin</key>
+ <string>(:^|(?&lt;=\t))(?!$|\t)</string>
+ <key>contentName</key>
+ <string>meta.tabular.field.tsv</string>
+ <key>end</key>
+ <string>$|(\t)</string>
+ <key>endCaptures</key>
+ <dict>
+ <key>1</key>
+ <dict>
+ <key>name</key>
+ <string>punctuation.separator.tabular.field.tsv</string>
+ </dict>
+ </dict>
+ </dict>
+ <dict>
+ <key>match</key>
+ <string>\t</string>
+ <key>name</key>
+ <string>punctuation.separator.tabular.field.tsv</string>
+ </dict>
+ </array>
+ </dict>
+ <key>header</key>
+ <dict>
+ <key>begin</key>
+ <string>^(?!$)</string>
+ <key>end</key>
+ <string>$</string>
+ <key>name</key>
+ <string>meta.tabular.row.header.tsv</string>
+ <key>patterns</key>
+ <array>
+ <dict>
+ <key>include</key>
+ <string>#field</string>
+ </dict>
+ </array>
+ </dict>
+ <key>row</key>
+ <dict>
+ <key>begin</key>
+ <string>^(?!$)</string>
+ <key>end</key>
+ <string>$</string>
+ <key>name</key>
+ <string>meta.tabular.row.tsv</string>
+ <key>patterns</key>
+ <array>
+ <dict>
+ <key>include</key>
+ <string>#field</string>
+ </dict>
+ </array>
+ </dict>
+ <key>table</key>
+ <dict>
+ <key>begin</key>
+ <string>^</string>
+ <key>end</key>
+ <string>^$not possible$^</string>
+ <key>name</key>
+ <string>meta.tabular.table.tsv</string>
+ <key>patterns</key>
+ <array>
+ <dict>
+ <key>include</key>
+ <string>#header</string>
+ </dict>
+ <dict>
+ <key>begin</key>
+ <string>(\n)</string>
+ <key>beginCaptures</key>
+ <dict>
+ <key>1</key>
+ <dict>
+ <key>name</key>
+ <string>punctuation.separator.table.row.tsv</string>
+ </dict>
+ </dict>
+ <key>comment</key>
+ <string>
+ everything after the first row is not a header
+ </string>
+ <key>end</key>
+ <string>^$not possible$^</string>
+ <key>patterns</key>
+ <array>
+ <dict>
+ <key>include</key>
+ <string>#row</string>
+ </dict>
+ <dict>
+ <key>match</key>
+ <string>\n</string>
+ <key>name</key>
+ <string>punctuation.separator.table.row.tsv</string>
+ </dict>
+ </array>
+ </dict>
+ </array>
+ </dict>
+ </dict>
+ <key>scopeName</key>
+ <string>text.tabular.tsv</string>
+ <key>uuid</key>
+ <string>7D87F38B-A972-4F61-B9C0-7D6D15EEED38</string>
+</dict>
+</plist>
15 info.plist
@@ -0,0 +1,15 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
+<plist version="1.0">
+<dict>
+ <key>name</key>
+ <string>Tabular</string>
+ <key>ordering</key>
+ <array>
+ <string>B0691F9F-D279-48CB-8959-2C9426579002</string>
+ <string>7D87F38B-A972-4F61-B9C0-7D6D15EEED38</string>
+ </array>
+ <key>uuid</key>
+ <string>D587784E-13B0-4090-BF67-42717CC5F89F</string>
+</dict>
+</plist>
Please sign in to comment.
Something went wrong with that request. Please try again.