├── .gitignore ├── screenshot.png ├── README.md ├── DBText.JSON-tmLanguage └── DBText.tmLanguage /.gitignore: -------------------------------------------------------------------------------- 1 | *.cache 2 | -------------------------------------------------------------------------------- /screenshot.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mistydemeo/DBTextWorks/master/screenshot.png -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | DB/TextWorks Syntax Highlighting for Sublime Text and TextMate 2 | ============================================================== 3 | 4 | ![Sublime Text screenshot](screenshot.png) 5 | 6 | This simple syntax highlighting makes working with text file dumps from DB/TextWorks thesauri much easier. 7 | 8 | Note that the syntax regions are assigned arbitrarily to get attractive colours. "UF" isn't actually a comment, etc. 9 | 10 | (It's questionable whether this is really the DB/TextWorks syntax at all, since I don't have the software. This was written for a set of .txt files from DB/TextWorks users I've had to work with, and based on the syntax of those. I'm assuming that's actually DB/TextWorks format.) 11 | -------------------------------------------------------------------------------- /DBText.JSON-tmLanguage: -------------------------------------------------------------------------------- 1 | { "name": "DBTextWorks Thesaurus", 2 | "scopeName": "text.dbtext", 3 | "fileTypes": [""], 4 | "patterns": [ 5 | { 6 | "match": "^(Term|ScopeNote|DateCreated|DateChanged|'\\w+( \\w+)*')", 7 | "name": "Generic header", 8 | "captures": { 9 | "1": { "name": "variable.language" } 10 | } 11 | }, 12 | { 13 | "match": "^(RT)", 14 | "name": "Related", 15 | "captures": { 16 | "1": { "name": "string" } 17 | } 18 | }, 19 | { 20 | "match": "^(BT)", 21 | "name": "Broader", 22 | "captures": { 23 | "1": { "name": "support" } 24 | } 25 | }, 26 | { 27 | "match": "^(NT)", 28 | "name": "Narrower", 29 | "captures": { 30 | "1": { "name": "entity" } 31 | } 32 | }, 33 | { 34 | "match": "^(UF)", 35 | "name": "Use for", 36 | "captures": { 37 | "1": { "name": "comment" } 38 | } 39 | }, 40 | { 41 | "match": "^(Use)", 42 | "name": "Use", 43 | "captures": { 44 | "1": { "name": "invalid" } 45 | } 46 | }, 47 | { 48 | "match": "(^ID) (\\d+)", 49 | "name": "ID number", 50 | "captures": { 51 | "1": { "name": "variable.language" }, 52 | "2": { "name": "constant.numeric.ssraw" } 53 | } 54 | }, 55 | { 56 | "match": "^(;)", 57 | "name": "Line continuation", 58 | "captures": { 59 | "1": { "name": "string" } 60 | } 61 | }, 62 | { 63 | "match": "^(\\$)$", 64 | "name": "End of term", 65 | "captures": { 66 | "1": { "name": "meta" } 67 | } 68 | } 69 | ], 70 | "uuid": "c4e7bc1a-d782-4559-87a4-f3373178fe63" 71 | } -------------------------------------------------------------------------------- /DBText.tmLanguage: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | fileTypes 6 | 7 | 8 | 9 | name 10 | DBTextWorks Thesaurus 11 | patterns 12 | 13 | 14 | captures 15 | 16 | 1 17 | 18 | name 19 | variable.language 20 | 21 | 22 | match 23 | ^(Term|ScopeNote|DateCreated|DateChanged|'\w+( \w+)*') 24 | name 25 | Generic header 26 | 27 | 28 | captures 29 | 30 | 1 31 | 32 | name 33 | string 34 | 35 | 36 | match 37 | ^(RT) 38 | name 39 | Related 40 | 41 | 42 | captures 43 | 44 | 1 45 | 46 | name 47 | support 48 | 49 | 50 | match 51 | ^(BT) 52 | name 53 | Broader 54 | 55 | 56 | captures 57 | 58 | 1 59 | 60 | name 61 | entity 62 | 63 | 64 | match 65 | ^(NT) 66 | name 67 | Narrower 68 | 69 | 70 | captures 71 | 72 | 1 73 | 74 | name 75 | comment 76 | 77 | 78 | match 79 | ^(UF) 80 | name 81 | Use for 82 | 83 | 84 | captures 85 | 86 | 1 87 | 88 | name 89 | invalid 90 | 91 | 92 | match 93 | ^(Use) 94 | name 95 | Use 96 | 97 | 98 | captures 99 | 100 | 1 101 | 102 | name 103 | variable.language 104 | 105 | 2 106 | 107 | name 108 | constant.numeric.ssraw 109 | 110 | 111 | match 112 | (^ID) (\d+) 113 | name 114 | ID number 115 | 116 | 117 | captures 118 | 119 | 1 120 | 121 | name 122 | string 123 | 124 | 125 | match 126 | ^(;) 127 | name 128 | Line continuation 129 | 130 | 131 | captures 132 | 133 | 1 134 | 135 | name 136 | meta 137 | 138 | 139 | match 140 | ^(\$)$ 141 | name 142 | End of term 143 | 144 | 145 | scopeName 146 | text.dbtext 147 | uuid 148 | c4e7bc1a-d782-4559-87a4-f3373178fe63 149 | 150 | 151 | --------------------------------------------------------------------------------