Permalink
Browse files

From Michail Pishchagin <mblsha~at~gmail•com>:

• markup Object Pascal extensions
• useful snippets
• setup comment preferences for Pascal


git-svn-id: http://svn.textmate.org/trunk/Bundles/Pascal.tmbundle@5197 dfb7d73b-c2ec-0310-8fea-fb051d288c6d
  • Loading branch information...
1 parent 95f9e8e commit 732325a7b877ae363d0647a9931db9ba8e6c28ae @sorbits sorbits committed Sep 13, 2006
@@ -24,7 +24,28 @@
</array>
</array>
<key>increaseIndentPattern</key>
- <string>\b(?i:(loop|declare|begin|exception|when|procedure|for|if|else|task|type|package))\b</string>
+ <string>\b(?i:(begin|declare|else|except|exception|finally|for|if|loop|package|procedure|task|try|type|when))\b</string>
+ <key>shellVariables</key>
+ <array>
+ <dict>
+ <key>name</key>
+ <string>TM_COMMENT_START</string>
+ <key>value</key>
+ <string>// </string>
+ </dict>
+ <dict>
+ <key>name</key>
+ <string>TM_COMMENT_START_2</string>
+ <key>value</key>
+ <string>/*</string>
+ </dict>
+ <dict>
+ <key>name</key>
+ <string>TM_COMMENT_END_2</string>
+ <key>value</key>
+ <string>*/</string>
+ </dict>
+ </array>
<key>smartTypingPairs</key>
<array>
<array>
@@ -0,0 +1,16 @@
+<?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>content</key>
+ <string>#13#10</string>
+ <key>keyEquivalent</key>
+ <string>^</string>
+ <key>name</key>
+ <string>Newline</string>
+ <key>scope</key>
+ <string>source.pascal</string>
+ <key>uuid</key>
+ <string>6435405A-6B00-4860-A7EB-AC7D63FF286A</string>
+</dict>
+</plist>
@@ -0,0 +1,18 @@
+<?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>content</key>
+ <string>begin
+ $0
+end;</string>
+ <key>name</key>
+ <string>begin … end</string>
+ <key>scope</key>
+ <string>source.pascal</string>
+ <key>tabTrigger</key>
+ <string>begin</string>
+ <key>uuid</key>
+ <string>8B351BE6-14CC-4C00-85ED-F307942A027F</string>
+</dict>
+</plist>
@@ -0,0 +1,18 @@
+<?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>content</key>
+ <string>T${1:ClassName} = class
+ $0
+end;</string>
+ <key>name</key>
+ <string>class … end</string>
+ <key>scope</key>
+ <string>source.pascal</string>
+ <key>tabTrigger</key>
+ <string>class</string>
+ <key>uuid</key>
+ <string>B8D8A919-B1D9-48BE-B19B-E544FF7BD8CC</string>
+</dict>
+</plist>
@@ -0,0 +1,17 @@
+<?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>content</key>
+ <string>constructor Create${1:()};
+destructor Destroy; override;$0</string>
+ <key>name</key>
+ <string>constructor, destructor</string>
+ <key>scope</key>
+ <string>source.pascal</string>
+ <key>tabTrigger</key>
+ <string>constructor</string>
+ <key>uuid</key>
+ <string>FAC2C75B-FCE5-4A7E-9B17-63E775BA6B21</string>
+</dict>
+</plist>
@@ -0,0 +1,18 @@
+<?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>content</key>
+ <string>for ${1:i} := ${2:0} to ${3:max} do begin
+ $0
+end;</string>
+ <key>name</key>
+ <string>for … end</string>
+ <key>scope</key>
+ <string>source.pascal</string>
+ <key>tabTrigger</key>
+ <string>for</string>
+ <key>uuid</key>
+ <string>0F08A7E4-18E3-4F51-BC7F-5FFC378340AB</string>
+</dict>
+</plist>
View
@@ -0,0 +1,18 @@
+<?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>content</key>
+ <string>if ${1} then begin
+ $0
+end;</string>
+ <key>name</key>
+ <string>if … end</string>
+ <key>scope</key>
+ <string>source.pascal</string>
+ <key>tabTrigger</key>
+ <string>if</string>
+ <key>uuid</key>
+ <string>79D1758B-ADC2-4421-81E0-A59E13BA9485</string>
+</dict>
+</plist>
@@ -0,0 +1,16 @@
+<?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>content</key>
+ <string>property ${1:PropertyName}: ${2:WideString} read ${3:F}${1} write ${4:F}${1};$0</string>
+ <key>name</key>
+ <string>property</string>
+ <key>scope</key>
+ <string>source.pascal</string>
+ <key>tabTrigger</key>
+ <string>prop</string>
+ <key>uuid</key>
+ <string>2CB361D7-E167-4B41-A094-07F6BD9FB896</string>
+</dict>
+</plist>
@@ -0,0 +1,20 @@
+<?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>content</key>
+ <string>try
+ $0
+finally
+ $1
+end;</string>
+ <key>name</key>
+ <string>try … finally</string>
+ <key>scope</key>
+ <string>source.pascal</string>
+ <key>tabTrigger</key>
+ <string>try</string>
+ <key>uuid</key>
+ <string>4FA629B0-2CD2-4833-9C9E-F44EE762A997</string>
+</dict>
+</plist>
@@ -0,0 +1,27 @@
+<?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>content</key>
+ <string>unit ${1:unit_name};
+
+interface
+
+uses
+ SysUtils${2:, Classes};
+
+implementation
+
+$0
+
+end.</string>
+ <key>name</key>
+ <string>unit … implementation … end</string>
+ <key>scope</key>
+ <string>source.pascal</string>
+ <key>tabTrigger</key>
+ <string>unit</string>
+ <key>uuid</key>
+ <string>72E62411-1227-4115-BC7E-CA3BDBC95B26</string>
+</dict>
+</plist>
@@ -10,7 +10,7 @@
<string>p</string>
</array>
<key>foldingStartMarker</key>
- <string>\b(?i:(procedure|package|function|type))\b</string>
+ <string>\b(?i:(function|package|procedure|try|type))\b</string>
<key>foldingStopMarker</key>
<string>\b(?i:(end))\b</string>
<key>keyEquivalent</key>
@@ -21,7 +21,7 @@
<array>
<dict>
<key>match</key>
- <string>\b(?i:(absolute|abstract|all|and|and_then|array|as|asm|attribute|begin|bindable|case|class|const|constructor|destructor|div|do|end|do|else|end|export|exports|external|far|file|finalization|for|forward|goto|if|implementation|import|in|inherited|initialization|interface|interrupt|is|label|library|mod|module|name|near|nil|not|object|of|only|operator|or|or_else|otherwise|packed|pow|private|program|property|protected|public|published|qualified|record|repeat|resident|restricted|segment|set|shl|shr|then|to|type|unit|until|uses|value|var|view|virtual|while|with|xor))\b</string>
+ <string>\b(?i:(absolute|abstract|all|and|and_then|array|as|asm|attribute|begin|bindable|case|class|const|constructor|destructor|div|do|do|else|end|except|export|exports|external|far|file|finalization|finally|for|forward|goto|if|implementation|import|in|inherited|initialization|interface|interrupt|is|label|library|mod|module|name|near|nil|not|object|of|only|operator|or|or_else|otherwise|packed|pow|private|program|property|protected|public|published|qualified|record|repeat|resident|restricted|segment|set|shl|shr|then|to|try|type|unit|until|uses|value|var|view|virtual|while|with|xor))\b</string>
<key>name</key>
<string>keyword.control.pascal</string>
</dict>
View
@@ -2,10 +2,42 @@
<!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>mainMenu</key>
+ <dict>
+ <key>excludedItems</key>
+ <array>
+ <string>6435405A-6B00-4860-A7EB-AC7D63FF286A</string>
+ </array>
+ <key>items</key>
+ <array>
+ <string>8B351BE6-14CC-4C00-85ED-F307942A027F</string>
+ <string>4FA629B0-2CD2-4833-9C9E-F44EE762A997</string>
+ <string>------------------------------------</string>
+ <string>0F08A7E4-18E3-4F51-BC7F-5FFC378340AB</string>
+ <string>79D1758B-ADC2-4421-81E0-A59E13BA9485</string>
+ <string>------------------------------------</string>
+ <string>B8D8A919-B1D9-48BE-B19B-E544FF7BD8CC</string>
+ <string>72E62411-1227-4115-BC7E-CA3BDBC95B26</string>
+ <string>------------------------------------</string>
+ <string>2CB361D7-E167-4B41-A094-07F6BD9FB896</string>
+ <string>FAC2C75B-FCE5-4A7E-9B17-63E775BA6B21</string>
+ </array>
+ <key>submenus</key>
+ <dict/>
+ </dict>
<key>name</key>
<string>Pascal</string>
<key>ordering</key>
<array>
+ <string>8B351BE6-14CC-4C00-85ED-F307942A027F</string>
+ <string>4FA629B0-2CD2-4833-9C9E-F44EE762A997</string>
+ <string>0F08A7E4-18E3-4F51-BC7F-5FFC378340AB</string>
+ <string>79D1758B-ADC2-4421-81E0-A59E13BA9485</string>
+ <string>B8D8A919-B1D9-48BE-B19B-E544FF7BD8CC</string>
+ <string>72E62411-1227-4115-BC7E-CA3BDBC95B26</string>
+ <string>FAC2C75B-FCE5-4A7E-9B17-63E775BA6B21</string>
+ <string>2CB361D7-E167-4B41-A094-07F6BD9FB896</string>
+ <string>6435405A-6B00-4860-A7EB-AC7D63FF286A</string>
<string>F42FA544-6B1C-11D9-9517-000D93589AF6</string>
<string>84E8D096-0C4D-4830-A9EA-9C1DE257775F</string>
</array>

0 comments on commit 732325a

Please sign in to comment.