diff --git a/bundles/text.tmbundle/Commands/Convert to ASCII.plist b/bundles/text.tmbundle/Commands/Convert to ASCII.plist new file mode 100644 index 000000000..d892bbcaa --- /dev/null +++ b/bundles/text.tmbundle/Commands/Convert to ASCII.plist @@ -0,0 +1,20 @@ + + + + + beforeRunningCommand + nop + command + iconv -c -f utf-8 -t ASCII//TRANSLIT + fallbackInput + word + input + selection + name + Transliterate Word / Selection to ASCII + output + replaceSelectedText + uuid + 3AA8A593-6E4C-11D9-91AF-000D93589AF6 + + diff --git a/bundles/text.tmbundle/Commands/Convert to hex.plist b/bundles/text.tmbundle/Commands/Convert to hex.plist new file mode 100644 index 000000000..50466cd70 --- /dev/null +++ b/bundles/text.tmbundle/Commands/Convert to hex.plist @@ -0,0 +1,23 @@ + + + + + beforeRunningCommand + nop + command + #!/usr/bin/env ruby -wKU +print STDIN.read.unpack("U*").map { |e| sprintf('0x%02x', e) }.join(' ') + fallbackInput + character + input + selection + keyEquivalent + ^X + name + Convert Character / Selection to Hex + output + replaceSelectedText + uuid + 7C9736B2-B851-11D9-B05D-00039369B986 + + diff --git a/bundles/text.tmbundle/Commands/Copy Matching Lines into New Document.tmCommand b/bundles/text.tmbundle/Commands/Copy Matching Lines into New Document.tmCommand new file mode 100644 index 000000000..63a8a4326 --- /dev/null +++ b/bundles/text.tmbundle/Commands/Copy Matching Lines into New Document.tmCommand @@ -0,0 +1,37 @@ + + + + + beforeRunningCommand + nop + bundleUUID + B7BC3FFD-6E4B-11D9-91AF-000D93589AF6 + command + res=$(ruby -rui -e"print TextMate::UI.request_string(:title => 'Filter Matching Lines', :prompt => 'Enter a pattern:', :button1 => 'Filter', :button2 => 'Cancel').to_s") + +[[ -z "$res" ]] && exit_discard +export pattern="$res" + +# This could be done with grep, but Python's RE is closer to oniguruma +"${TM_PYTHON:-python}" -c ' +import sys, os, re, traceback +try: + pattern = re.compile(os.environ["pattern"]) +except re.error, e: + sys.stderr.write("Invalid pattern: %s" % e) + sys.exit(1) +for line in sys.stdin: + if pattern.search(line): + sys.stdout.write(line) +' || exit_show_tool_tip + + input + selection + name + Copy Matching Lines into New Document + output + openAsNewDocument + uuid + 965DF29E-4EBD-457A-9A61-56D920C35F72 + + diff --git a/bundles/text.tmbundle/Commands/Copy Non-Matching Lines into New Document.tmCommand b/bundles/text.tmbundle/Commands/Copy Non-Matching Lines into New Document.tmCommand new file mode 100644 index 000000000..b97dcc881 --- /dev/null +++ b/bundles/text.tmbundle/Commands/Copy Non-Matching Lines into New Document.tmCommand @@ -0,0 +1,37 @@ + + + + + beforeRunningCommand + nop + bundleUUID + B7BC3FFD-6E4B-11D9-91AF-000D93589AF6 + command + res=$(ruby -rui -e"print TextMate::UI.request_string(:title => 'Filter Non-Matching Lines', :prompt => 'Enter a pattern:', :button1 => 'Filter', :button2 => 'Cancel').to_s") + +[[ -z "$res" ]] && exit_discard +export pattern="$res" + +# This could be done with grep, but Python's RE is closer to oniguruma +"${TM_PYTHON:-python}" -c ' +import sys, os, re, traceback +try: + pattern = re.compile(os.environ["pattern"]) +except re.error, e: + sys.stderr.write("Invalid pattern: %s" % e) + sys.exit(1) +for line in sys.stdin: + if not pattern.search(line): + sys.stdout.write(line) +' || exit_show_tool_tip + + input + selection + name + Copy Non-Matching Lines into New Document + output + openAsNewDocument + uuid + 8109F2C2-FF63-46F7-83F3-D2318290FC11 + + diff --git a/bundles/text.tmbundle/Commands/Decrypt selection.plist b/bundles/text.tmbundle/Commands/Decrypt selection.plist new file mode 100644 index 000000000..1cfeace9e --- /dev/null +++ b/bundles/text.tmbundle/Commands/Decrypt selection.plist @@ -0,0 +1,32 @@ + + + + + beforeRunningCommand + nop + command + get_pw () { + ruby -rui -e"print TextMate::UI.request_secure_string(:title => 'Decrypt AES 128 Encrypted Text', :prompt => '$1', :button1 => '$2', :button2 => 'Cancel').to_s" +} + +pw=$(get_pw 'What is the password?' Decrypt) +[[ -z "$pw" ]] && exit_discard + +if ! openssl enc -d -aes128 -base64 -pass "pass:$pw"; then + exit_show_tool_tip +fi + + fallbackInput + document + input + selection + keyEquivalent + ^@E + name + AES Decrypt Document / Selection With Password… + output + replaceSelectedText + uuid + 4B22577B-BC8E-11D9-8946-000D93589AF6 + + diff --git a/bundles/text.tmbundle/Commands/Distill Document : Selection.tmCommand b/bundles/text.tmbundle/Commands/Distill Document : Selection.tmCommand new file mode 100644 index 000000000..13a4b72fe --- /dev/null +++ b/bundles/text.tmbundle/Commands/Distill Document : Selection.tmCommand @@ -0,0 +1,43 @@ + + + + + beforeRunningCommand + nop + bundleUUID + B7BC3FFD-6E4B-11D9-91AF-000D93589AF6 + command + res=$(ruby -rui -e"print TextMate::UI.request_string(:title => 'Distill Text', :prompt => 'Enter a pattern:', :button1 => 'Filter', :button2 => 'Cancel').to_s") + +[[ -z "$res" ]] && exit_discard +export pattern="$res" + +# This could be done with grep, but Python's RE is closer to oniguruma +"${TM_PYTHON:-python}" -c ' +import sys, os, re, traceback +try: + pattern = re.compile(os.environ["pattern"]) +except re.error, e: + sys.stderr.write("Invalid pattern: %s" % e) + sys.exit(1) +mate = "\"%s/bin/mate\" -a" % os.environ["TM_SUPPORT_PATH"] +pb = os.popen(mate, "w") +for line in sys.stdin: + if pattern.search(line): + pb.write(line) + else: + sys.stdout.write(line) +pb.close() +' || exit_show_tool_tip + + + input + selection + name + Distill Document / Selection + output + replaceSelectedText + uuid + DA5AD0D9-F7C0-4010-9FDC-FF01B0434F9A + + diff --git a/bundles/text.tmbundle/Commands/Duplicate Line.plist b/bundles/text.tmbundle/Commands/Duplicate Line.plist new file mode 100644 index 000000000..dbdef7157 --- /dev/null +++ b/bundles/text.tmbundle/Commands/Duplicate Line.plist @@ -0,0 +1,38 @@ + + + + + beforeRunningCommand + nop + command + #!/usr/bin/env ruby -wKU + +# If there’s a selection, output that twice (as a snippet) +# leaving the duplicate as the new selected text. +# Otherwise split the current line around the caret and +# output “right, left” to duplicate the line, leaving the +# caret in the same place on the new line + +require File.join(ENV["TM_SUPPORT_PATH"], "lib/exit_codes.rb") +require File.join(ENV["TM_SUPPORT_PATH"], "lib/escape.rb") + +if ENV['TM_SELECTED_TEXT'] != nil + TextMate.exit_insert_snippet(e_sn(ENV['TM_SELECTED_TEXT']) + "${0:" + e_snp(ENV['TM_SELECTED_TEXT']) + "}") +else + col = ENV['TM_LINE_INDEX'].to_i + TextMate.exit_insert_text(ENV['TM_CURRENT_LINE'][col..-1] + "\n" + ENV['TM_CURRENT_LINE'][0...col]) +end + fallbackInput + none + input + selection + keyEquivalent + ^D + name + Duplicate Line / Selection + output + afterSelectedText + uuid + C46A9DBC-0B06-49DF-838B-491B529ECF22 + + diff --git a/bundles/text.tmbundle/Commands/Encrypt selection.plist b/bundles/text.tmbundle/Commands/Encrypt selection.plist new file mode 100644 index 000000000..d44587104 --- /dev/null +++ b/bundles/text.tmbundle/Commands/Encrypt selection.plist @@ -0,0 +1,33 @@ + + + + + beforeRunningCommand + nop + command + get_pw () { + ruby -rui -e"print TextMate::UI.request_secure_string(:title => 'Encrypt Text With AES 128', :prompt => '$1', :button1 => '$2', :button2 => 'Cancel').to_s" +} +pw1=$(get_pw 'What password should be used?' Continue) +[[ -z "$pw1" ]] && exit_discard +pw2=$(get_pw 'Enter password again to verify.' Encrypt) + +if [[ "$pw1" == "$pw2" ]]; + then openssl enc -e -aes128 -base64 -pass "pass:$pw1" + else exit_show_tool_tip 'Password mismatch! Please play again.' +fi + + fallbackInput + document + input + selection + keyEquivalent + ^@E + name + AES Encrypt Document / Selection With Password… + output + replaceSelectedText + uuid + D39DC176-BC8D-11D9-8946-000D93589AF6 + + diff --git a/bundles/text.tmbundle/Commands/Enumerate Lines.plist b/bundles/text.tmbundle/Commands/Enumerate Lines.plist new file mode 100644 index 000000000..162a37937 --- /dev/null +++ b/bundles/text.tmbundle/Commands/Enumerate Lines.plist @@ -0,0 +1,22 @@ + + + + + beforeRunningCommand + nop + command + cat -n|expand -8 + fallbackInput + document + input + selection + keyEquivalent + + name + Add Line Numbers to Document / Selection + output + replaceSelectedText + uuid + 8085013F-8DEA-11D9-B421-000D93589AF6 + + diff --git a/bundles/text.tmbundle/Commands/Open Current URL.plist b/bundles/text.tmbundle/Commands/Open Current URL.plist new file mode 100644 index 000000000..b563a0d51 --- /dev/null +++ b/bundles/text.tmbundle/Commands/Open Current URL.plist @@ -0,0 +1,25 @@ + + + + + beforeRunningCommand + nop + command + open "$(cat)" + + fallbackInput + scope + input + selection + keyEquivalent +  + name + Open Current URL + output + discard + scope + markup.underline.link - markup.underline.link.relative + uuid + 5A08E461-05CC-4C03-9DC8-BF118594EA3E + + diff --git a/bundles/text.tmbundle/Commands/Randomize Lines in Document : Selection.tmCommand b/bundles/text.tmbundle/Commands/Randomize Lines in Document : Selection.tmCommand new file mode 100644 index 000000000..528aba117 --- /dev/null +++ b/bundles/text.tmbundle/Commands/Randomize Lines in Document : Selection.tmCommand @@ -0,0 +1,18 @@ + + + + + beforeRunningCommand + nop + command + ruby -pe'$_ = (rand * 100000000).round.to_s + "\t" + $_'|sort|cut -f2- + input + selection + name + Randomize Lines in Document / Selection + output + replaceSelectedText + uuid + 90291A6E-34F6-4FD5-BA82-6BB6FB4DD492 + + diff --git a/bundles/text.tmbundle/Commands/Sort & Uniq.plist b/bundles/text.tmbundle/Commands/Sort & Uniq.plist new file mode 100644 index 000000000..08e43318a --- /dev/null +++ b/bundles/text.tmbundle/Commands/Sort & Uniq.plist @@ -0,0 +1,20 @@ + + + + + beforeRunningCommand + nop + command + sort -f|uniq + input + selection + keyEquivalent + + name + Sort Lines & Remove Duplicates + output + replaceSelectedText + uuid + 3010E2A8-6E4F-11D9-A18D-000D93589AF6 + + diff --git a/bundles/text.tmbundle/Commands/Sort.plist b/bundles/text.tmbundle/Commands/Sort.plist new file mode 100644 index 000000000..bb6a20929 --- /dev/null +++ b/bundles/text.tmbundle/Commands/Sort.plist @@ -0,0 +1,22 @@ + + + + + beforeRunningCommand + nop + command + sort -f + fallbackInput + document + input + selection + keyEquivalent + + name + Sort Lines in Document / Selection + output + replaceSelectedText + uuid + 273853DF-6E4F-11D9-A18D-000D93589AF6 + + diff --git a/bundles/text.tmbundle/Commands/Speak Document : Selection.tmCommand b/bundles/text.tmbundle/Commands/Speak Document : Selection.tmCommand new file mode 100644 index 000000000..297cc2f8a --- /dev/null +++ b/bundles/text.tmbundle/Commands/Speak Document : Selection.tmCommand @@ -0,0 +1,18 @@ + + + + + beforeRunningCommand + nop + command + say `echo "$TM_SELECTED_TEXT"` & + input + selection + name + Speak Document / Selection + output + discard + uuid + D26BEEE3-7439-4B7E-AD9D-9A144CDC5873 + + diff --git a/bundles/text.tmbundle/Commands/Strip non-printables.plist b/bundles/text.tmbundle/Commands/Strip non-printables.plist new file mode 100644 index 000000000..792398628 --- /dev/null +++ b/bundles/text.tmbundle/Commands/Strip non-printables.plist @@ -0,0 +1,20 @@ + + + + + beforeRunningCommand + nop + command + perl -pe 's/[^\t\n\x20-\xFF]|\x7F|\xC2[\x80-\x9F]//g' + fallbackInput + document + input + selection + name + Remove Unprintable Characters in Document / Selection + output + replaceSelectedText + uuid + BEC25DC3-6E4B-11D9-91AF-000D93589AF6 + + diff --git a/bundles/text.tmbundle/Commands/Strip trailing spaces.plist b/bundles/text.tmbundle/Commands/Strip trailing spaces.plist new file mode 100644 index 000000000..dda9a4559 --- /dev/null +++ b/bundles/text.tmbundle/Commands/Strip trailing spaces.plist @@ -0,0 +1,20 @@ + + + + + beforeRunningCommand + nop + command + perl -pe 's/[\t ]+$//g' + fallbackInput + document + input + selection + name + Remove Trailing Spaces in Document / Selection + output + replaceSelectedText + uuid + 0F8C1F78-6E4C-11D9-91AF-000D93589AF6 + + diff --git a/bundles/text.tmbundle/Commands/Word Count.plist b/bundles/text.tmbundle/Commands/Word Count.plist new file mode 100644 index 000000000..9f6af2d55 --- /dev/null +++ b/bundles/text.tmbundle/Commands/Word Count.plist @@ -0,0 +1,36 @@ + + + + + beforeRunningCommand + nop + command + #!/usr/bin/env ruby -wKU + +def pretty(number) + number.to_s.gsub(/\d{1,3}(?=\d{3}+(?!\d))/, '\0,') +end + +counts = `wc -lwc`.scan(/\d+/) +counts[0] = counts[0].to_i + 1 # increase one to the line count + +%w[ line word byte ].each do |unit| + cnt = counts.shift + plural = cnt.to_i != 1 ? 's' : '' + printf("%11.11s %s%s\n", pretty(cnt), unit, plural) +end + + fallbackInput + document + input + selection + keyEquivalent + ^N + name + Statistics for Document / Selection (Word Count) + output + showAsTooltip + uuid + AA202E76-8A0A-11D9-B85D-000D93589AF6 + + diff --git a/bundles/text.tmbundle/Macros/Delete Line.plist b/bundles/text.tmbundle/Macros/Delete Line.plist new file mode 100644 index 000000000..52645b1c9 --- /dev/null +++ b/bundles/text.tmbundle/Macros/Delete Line.plist @@ -0,0 +1,25 @@ + + + + + commands + + + command + selectHardLine: + + + command + deleteBackward: + + + keyEquivalent + ^K + name + Delete Line + scopeType + local + uuid + FB8960DB-AA2E-11D9-8E27-000D93589AF6 + + diff --git a/bundles/text.tmbundle/Macros/Delete to Beginning of Line.tmMacro b/bundles/text.tmbundle/Macros/Delete to Beginning of Line.tmMacro new file mode 100644 index 000000000..f2c5dc42e --- /dev/null +++ b/bundles/text.tmbundle/Macros/Delete to Beginning of Line.tmMacro @@ -0,0 +1,19 @@ + + + + + commands + + + command + deleteToBeginningOfLine: + + + keyEquivalent + @ + name + Delete to Beginning of Line + uuid + F22BEB71-2DE3-4183-BB10-0199CC328169 + + diff --git a/bundles/text.tmbundle/Macros/EOL + . + LF.plist b/bundles/text.tmbundle/Macros/EOL + . + LF.plist new file mode 100644 index 000000000..696d519cd --- /dev/null +++ b/bundles/text.tmbundle/Macros/EOL + . + LF.plist @@ -0,0 +1,31 @@ + + + + + commands + + + command + moveToEndOfParagraph: + + + argument + . + command + insertText: + + + command + insertNewline: + + + keyEquivalent + $@ + name + Move to EOL and Insert "." + LF + scope + text + uuid + E86C9A77-5B48-43C6-A712-A61B616269E6 + + diff --git a/bundles/text.tmbundle/Macros/EOL + ..plist b/bundles/text.tmbundle/Macros/EOL + ..plist new file mode 100644 index 000000000..811816a32 --- /dev/null +++ b/bundles/text.tmbundle/Macros/EOL + ..plist @@ -0,0 +1,29 @@ + + + + + commands + + + command + moveToEndOfParagraph: + + + argument + . + command + insertText: + + + keyEquivalent + ~@ + name + Move to EOL and Insert “.” + scope + text + scopeType + local + uuid + 80CC504F-B13B-11D9-B41F-000D93589AF6 + + diff --git a/bundles/text.tmbundle/Macros/Join Lines.plist b/bundles/text.tmbundle/Macros/Join Lines.plist new file mode 100644 index 000000000..3787bca54 --- /dev/null +++ b/bundles/text.tmbundle/Macros/Join Lines.plist @@ -0,0 +1,46 @@ + + + + + commands + + + argument + + action + findNext + findInProjectIgnoreCase + + findInProjectRegularExpression + + findString + $\n\s* + ignoreCase + + regularExpression + + replaceAllScope + document + replaceString + key + wrapAround + + + command + findWithOptions: + + + command + deleteForward: + + + keyEquivalent + ^J + name + Join Line With Next + scopeType + local + uuid + 3D7504EE-B927-4D3D-A3CC-BFB189027EE7 + + diff --git a/bundles/text.tmbundle/Preferences/Markup style: Bold.plist b/bundles/text.tmbundle/Preferences/Markup style: Bold.plist new file mode 100644 index 000000000..5a63bd8b7 --- /dev/null +++ b/bundles/text.tmbundle/Preferences/Markup style: Bold.plist @@ -0,0 +1,17 @@ + + + + + name + Style: Bold + scope + markup.bold + settings + + bold + 1 + + uuid + A088E2CA-03E7-4A8C-855C-AC954E739D6D + + diff --git a/bundles/text.tmbundle/Preferences/Markup style: Italic.plist b/bundles/text.tmbundle/Preferences/Markup style: Italic.plist new file mode 100644 index 000000000..9ea3216d3 --- /dev/null +++ b/bundles/text.tmbundle/Preferences/Markup style: Italic.plist @@ -0,0 +1,17 @@ + + + + + name + Style: Italic + scope + markup.italic + settings + + italic + 1 + + uuid + 2EE6D01F-50BC-434B-BE45-54D29CACB3E0 + + diff --git a/bundles/text.tmbundle/Preferences/Markup style: Underline.plist b/bundles/text.tmbundle/Preferences/Markup style: Underline.plist new file mode 100644 index 000000000..11a01ca40 --- /dev/null +++ b/bundles/text.tmbundle/Preferences/Markup style: Underline.plist @@ -0,0 +1,17 @@ + + + + + name + Style: Underline + scope + markup.underline + settings + + underline + 1 + + uuid + 4CCD8369-40E4-422A-ABE7-C32F3721AFEF + + diff --git a/bundles/text.tmbundle/Preferences/Miscellaneous.plist b/bundles/text.tmbundle/Preferences/Miscellaneous.plist new file mode 100644 index 000000000..04ffaf9d8 --- /dev/null +++ b/bundles/text.tmbundle/Preferences/Miscellaneous.plist @@ -0,0 +1,65 @@ + + + + + name + Miscellaneous + settings + + highlightPairs + + + ( + ) + + + { + } + + + [ + ] + + + + + + + + + + + smartTypingPairs + + + " + " + + + ( + ) + + + { + } + + + [ + ] + + + + + + + + + + + unIndentedLinePattern + ^\s*$ + + uuid + 3E8C2307-8175-4A58-BE07-785713D5837A + + diff --git a/bundles/text.tmbundle/Preferences/Spell checking.plist b/bundles/text.tmbundle/Preferences/Spell checking.plist new file mode 100644 index 000000000..3ef7e991a --- /dev/null +++ b/bundles/text.tmbundle/Preferences/Spell checking.plist @@ -0,0 +1,17 @@ + + + + + name + Spell Checking: Disable + scope + markup.underline.link, markup.raw + settings + + spellChecking + 0 + + uuid + 613405D5-67B6-4281-94C9-9148E54C66FB + + diff --git a/bundles/text.tmbundle/Snippets/010 Copyright.plist b/bundles/text.tmbundle/Snippets/010 Copyright.plist new file mode 100644 index 000000000..3d43183c1 --- /dev/null +++ b/bundles/text.tmbundle/Snippets/010 Copyright.plist @@ -0,0 +1,14 @@ + + + + + content + (c) Copyright `date +%Y` $TM_FULLNAME. All Rights Reserved. + name + Copyright Notice + tabTrigger + c) + uuid + BC8B89E4-5F16-11D9-B9C3-000D93589AF6 + + diff --git a/bundles/text.tmbundle/Snippets/Conitnue bullet.plist b/bundles/text.tmbundle/Snippets/Conitnue bullet.plist new file mode 100644 index 000000000..4704f7906 --- /dev/null +++ b/bundles/text.tmbundle/Snippets/Conitnue bullet.plist @@ -0,0 +1,17 @@ + + + + + content + +• + keyEquivalent +  + name + Continue Bullet + scope + meta.bullet-point + uuid + C30BA263-B10E-11D9-9975-000D93589AF6 + + diff --git a/bundles/text.tmbundle/Snippets/Conitnue light bullet.plist b/bundles/text.tmbundle/Snippets/Conitnue light bullet.plist new file mode 100644 index 000000000..2c0cd2a80 --- /dev/null +++ b/bundles/text.tmbundle/Snippets/Conitnue light bullet.plist @@ -0,0 +1,17 @@ + + + + + content + + keyEquivalent +  + name + Continue Light Bullet + scope + meta.bullet-point.light + uuid + EA149DAB-B10E-11D9-9975-000D93589AF6 + + diff --git a/bundles/text.tmbundle/Snippets/Conitnue star bullet.plist b/bundles/text.tmbundle/Snippets/Conitnue star bullet.plist new file mode 100644 index 000000000..81dc40471 --- /dev/null +++ b/bundles/text.tmbundle/Snippets/Conitnue star bullet.plist @@ -0,0 +1,17 @@ + + + + + content + +* + keyEquivalent +  + name + Continue Star Bullet + scope + meta.bullet-point.star + uuid + B5E22191-B151-11D9-85C9-000D93589AF6 + + diff --git a/bundles/text.tmbundle/Snippets/Insert ISO date.plist b/bundles/text.tmbundle/Snippets/Insert ISO date.plist new file mode 100644 index 000000000..c2b2f79b8 --- /dev/null +++ b/bundles/text.tmbundle/Snippets/Insert ISO date.plist @@ -0,0 +1,14 @@ + + + + + content + `date +%Y-%m-%d` + name + Current Date — YYYY-MM-DD + tabTrigger + isoD + uuid + C9CAF012-6E50-11D9-AA12-000D93589AF6 + + diff --git a/bundles/text.tmbundle/Snippets/Lorem ipsum.plist b/bundles/text.tmbundle/Snippets/Lorem ipsum.plist new file mode 100644 index 000000000..a30cff0d4 --- /dev/null +++ b/bundles/text.tmbundle/Snippets/Lorem ipsum.plist @@ -0,0 +1,14 @@ + + + + + content + Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum. + name + Lorem ipsum + tabTrigger + lorem + uuid + BA9A2B17-DA89-49A5-809B-AC7510C24625 + + diff --git a/bundles/text.tmbundle/Syntaxes/Plain text.plist b/bundles/text.tmbundle/Syntaxes/Plain text.plist new file mode 100644 index 000000000..58f61d336 --- /dev/null +++ b/bundles/text.tmbundle/Syntaxes/Plain text.plist @@ -0,0 +1,83 @@ + + + + + fileTypes + + txt + + keyEquivalent + ^~P + name + Plain Text + patterns + + + captures + + 1 + + name + punctuation.definition.item.text + + + match + ^\s*(•).*$\n? + name + meta.bullet-point.strong.text + + + captures + + 1 + + name + punctuation.definition.item.text + + + match + ^\s*(·).*$\n? + name + meta.bullet-point.light.text + + + captures + + 1 + + name + punctuation.definition.item.text + + + match + ^\s*(\*).*$\n? + name + meta.bullet-point.star.text + + + begin + ^([ \t]*)(?=\S) + contentName + meta.paragraph.text + end + ^(?!\1(?=\S)) + patterns + + + match + (?x) + ( (https?|s?ftp|ftps|file|smb|afp|nfs|(x-)?man|gopher|txmt)://|mailto:) + [-:@a-zA-Z0-9_.,~%+/?=&#]+(?<![.,?:]) + + name + markup.underline.link.text + + + + + scopeName + text.plain + uuid + 3130E4FA-B10E-11D9-9F75-000D93589AF6 + + diff --git a/bundles/text.tmbundle/Templates/Empty file/info.plist b/bundles/text.tmbundle/Templates/Empty file/info.plist new file mode 100644 index 000000000..5b2b2ffb5 --- /dev/null +++ b/bundles/text.tmbundle/Templates/Empty file/info.plist @@ -0,0 +1,14 @@ + + + + + command + touch "$TM_NEW_FILE" + isDefault + 1 + name + Empty File + uuid + 2D3AFF01-6DFB-11D9-91EB-000D93589AF6 + + diff --git a/bundles/text.tmbundle/Templates/From Clipboard/info.plist b/bundles/text.tmbundle/Templates/From Clipboard/info.plist new file mode 100644 index 000000000..54da778e6 --- /dev/null +++ b/bundles/text.tmbundle/Templates/From Clipboard/info.plist @@ -0,0 +1,17 @@ + + + + + command + if [[ ! -f "$TM_NEW_FILE" ]]; then + __CF_USER_TEXT_ENCODING=$UID:0x8000100:0x8000100 \ + pbpaste > "$TM_NEW_FILE" | tr '\r' '\n' +fi + extension + txt + name + From Clipboard + uuid + 1D357AB2-687A-4C74-AADE-6AE6684E97DC + + diff --git a/bundles/text.tmbundle/info.plist b/bundles/text.tmbundle/info.plist new file mode 100644 index 000000000..13b08e097 --- /dev/null +++ b/bundles/text.tmbundle/info.plist @@ -0,0 +1,139 @@ + + + + + contactEmailRot13 + gz-ohaqyrf@znpebzngrf.pbz + contactName + Allan Odgaard + deleted + + CF8570E4-389B-4928-8908-BF3B6A5E8422 + + description + The text bundle has a lot of support for plain text and is a requisite for working with text. + mainMenu + + excludedItems + + 5A08E461-05CC-4C03-9DC8-BF118594EA3E + C30BA263-B10E-11D9-9975-000D93589AF6 + EA149DAB-B10E-11D9-9975-000D93589AF6 + B5E22191-B151-11D9-85C9-000D93589AF6 + 80CC504F-B13B-11D9-B41F-000D93589AF6 + E86C9A77-5B48-43C6-A712-A61B616269E6 + F22BEB71-2DE3-4183-BB10-0199CC328169 + + items + + 818D10A3-F827-424A-BCBF-6DC6CB62966A + DAF7B200-5B75-4999-BBC3-D1ADD64E1FA1 + 172F6528-7561-44FC-BFAD-A06C645D5AFB + 4D6C0A7A-263C-4E2E-B2F2-1FA912E14490 + ------------------------------------ + FB8960DB-AA2E-11D9-8E27-000D93589AF6 + C46A9DBC-0B06-49DF-838B-491B529ECF22 + 3D7504EE-B927-4D3D-A3CC-BFB189027EE7 + ------------------------------------ + 8085013F-8DEA-11D9-B421-000D93589AF6 + AA202E76-8A0A-11D9-B85D-000D93589AF6 + ------------------------------------ + BC8B89E4-5F16-11D9-B9C3-000D93589AF6 + C9CAF012-6E50-11D9-AA12-000D93589AF6 + BA9A2B17-DA89-49A5-809B-AC7510C24625 + D26BEEE3-7439-4B7E-AD9D-9A144CDC5873 + + submenus + + 172F6528-7561-44FC-BFAD-A06C645D5AFB + + items + + DA5AD0D9-F7C0-4010-9FDC-FF01B0434F9A + 965DF29E-4EBD-457A-9A61-56D920C35F72 + 8109F2C2-FF63-46F7-83F3-D2318290FC11 + + name + Filtering + + 4D6C0A7A-263C-4E2E-B2F2-1FA912E14490 + + items + + 273853DF-6E4F-11D9-A18D-000D93589AF6 + 3010E2A8-6E4F-11D9-A18D-000D93589AF6 + ------------------------------------ + 90291A6E-34F6-4FD5-BA82-6BB6FB4DD492 + + name + Sorting + + 818D10A3-F827-424A-BCBF-6DC6CB62966A + + items + + 7C9736B2-B851-11D9-B05D-00039369B986 + 0F8C1F78-6E4C-11D9-91AF-000D93589AF6 + BEC25DC3-6E4B-11D9-91AF-000D93589AF6 + 3AA8A593-6E4C-11D9-91AF-000D93589AF6 + + name + Converting / Stripping + + DAF7B200-5B75-4999-BBC3-D1ADD64E1FA1 + + items + + D39DC176-BC8D-11D9-8946-000D93589AF6 + 4B22577B-BC8E-11D9-8946-000D93589AF6 + + name + Encryption + + + + name + Text + ordering + + 8085013F-8DEA-11D9-B421-000D93589AF6 + D39DC176-BC8D-11D9-8946-000D93589AF6 + 4B22577B-BC8E-11D9-8946-000D93589AF6 + 7C9736B2-B851-11D9-B05D-00039369B986 + C46A9DBC-0B06-49DF-838B-491B529ECF22 + 5A08E461-05CC-4C03-9DC8-BF118594EA3E + 0F8C1F78-6E4C-11D9-91AF-000D93589AF6 + BEC25DC3-6E4B-11D9-91AF-000D93589AF6 + 273853DF-6E4F-11D9-A18D-000D93589AF6 + 3010E2A8-6E4F-11D9-A18D-000D93589AF6 + 90291A6E-34F6-4FD5-BA82-6BB6FB4DD492 + AA202E76-8A0A-11D9-B85D-000D93589AF6 + 3AA8A593-6E4C-11D9-91AF-000D93589AF6 + D26BEEE3-7439-4B7E-AD9D-9A144CDC5873 + 965DF29E-4EBD-457A-9A61-56D920C35F72 + 8109F2C2-FF63-46F7-83F3-D2318290FC11 + DA5AD0D9-F7C0-4010-9FDC-FF01B0434F9A + FB8960DB-AA2E-11D9-8E27-000D93589AF6 + 3D7504EE-B927-4D3D-A3CC-BFB189027EE7 + 80CC504F-B13B-11D9-B41F-000D93589AF6 + E86C9A77-5B48-43C6-A712-A61B616269E6 + F22BEB71-2DE3-4183-BB10-0199CC328169 + C30BA263-B10E-11D9-9975-000D93589AF6 + EA149DAB-B10E-11D9-9975-000D93589AF6 + B5E22191-B151-11D9-85C9-000D93589AF6 + BC8B89E4-5F16-11D9-B9C3-000D93589AF6 + C9CAF012-6E50-11D9-AA12-000D93589AF6 + BA9A2B17-DA89-49A5-809B-AC7510C24625 + 3130E4FA-B10E-11D9-9F75-000D93589AF6 + 3E8C2307-8175-4A58-BE07-785713D5837A + 613405D5-67B6-4281-94C9-9148E54C66FB + A088E2CA-03E7-4A8C-855C-AC954E739D6D + 2EE6D01F-50BC-434B-BE45-54D29CACB3E0 + 4CCD8369-40E4-422A-ABE7-C32F3721AFEF + 2D3AFF01-6DFB-11D9-91EB-000D93589AF6 + 1D357AB2-687A-4C74-AADE-6AE6684E97DC + + uuid + B7BC3FFD-6E4B-11D9-91AF-000D93589AF6 + + diff --git a/src/app/text-mate-grammar.coffee b/src/app/text-mate-grammar.coffee index 58145f7c7..c1f65e997 100644 --- a/src/app/text-mate-grammar.coffee +++ b/src/app/text-mate-grammar.coffee @@ -26,7 +26,7 @@ class TextMateGrammar @grammarsByExtension[extension] = grammar @grammarForExtension: (extension) -> - @grammarsByExtension[extension] + @grammarsByExtension[extension] or @grammarsByExtension["txt"] name: null repository: null