├── README └── character-pair-autocomplete.textexpander /README: -------------------------------------------------------------------------------- 1 | Type a single parenthesis character or a quote character, and it is auto completed with the closing character. Further, if you select some text before typing a parenthesis or quote character, then the selected text gets enclosed within the opening and closing characters. 2 | 3 | This is for applications that do not natively have in-built character pair autocompletion. 4 | 5 | 2012 ckunte. 6 | 7 | Pre-requisite: TextExpander 8 | 9 | character-pair-autocomplete comes with ABSOLUTELY NO WARRANTY. This is free software under MIT license. 10 | 11 | 12 | -------------------------------------------------------------------------------- /character-pair-autocomplete.textexpander: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | groupInfo 6 | 7 | expandAfterMode 8 | 2 9 | groupName 10 | Character pair autocomplete 11 | 12 | snippetsTE2 13 | 14 | 15 | abbreviation 16 | { 17 | abbreviationMode 18 | 0 19 | creationDate 20 | 2012-02-19T04:48:27Z 21 | flags 22 | 0 23 | label 24 | 25 | modificationDate 26 | 2012-02-19T17:41:31Z 27 | plainText 28 | {%snippet:;seltxt%%|} 29 | snippetType 30 | 0 31 | useCount 32 | 0 33 | uuidString 34 | 1156A018-38F6-4962-809A-5223A1BAD194 35 | 36 | 37 | abbreviation 38 | < 39 | abbreviationMode 40 | 0 41 | creationDate 42 | 2012-02-19T04:48:14Z 43 | flags 44 | 0 45 | label 46 | 47 | modificationDate 48 | 2012-02-19T17:32:41Z 49 | plainText 50 | <%snippet:;seltxt%%|> 51 | snippetType 52 | 0 53 | useCount 54 | 0 55 | uuidString 56 | E670107C-3C8E-46C3-81F7-01B613B82F24 57 | 58 | 59 | abbreviation 60 | _ 61 | abbreviationMode 62 | 0 63 | creationDate 64 | 2012-02-19T04:29:02Z 65 | flags 66 | 0 67 | label 68 | 69 | lastUsed 70 | 2012-02-19T04:42:48Z 71 | modificationDate 72 | 2012-02-19T17:32:44Z 73 | plainText 74 | _%snippet:;seltxt%%|_ 75 | snippetType 76 | 0 77 | useCount 78 | 4 79 | uuidString 80 | AEED6CAD-7B55-44BD-89CA-154EB4125C8F 81 | 82 | 83 | abbreviation 84 | ;seltxt 85 | abbreviationMode 86 | 0 87 | creationDate 88 | 2012-02-19T04:03:54Z 89 | flags 90 | 1 91 | label 92 | Select Text script 93 | modificationDate 94 | 2012-02-19T17:39:42Z 95 | plainText 96 | -- Select Text -- by ckunte -- additions by Brett Terpstra Feb 2012 set s to "" tell application "System Events" set frontApp to (name of first process whose frontmost is true) end tell if frontApp is "MarsEdit" then tell application "MarsEdit" try set currentWindow to document 1 on error errorMessage displayErrorMessage("No post windows are open.") of me return end try set s to selected text of currentWindow end tell else if frontApp is "TextEdit" then tell application "System Events" to tell text area 1 of scroll area 1 of window 1 of process "TextEdit" to if exists then set {x, y} to value of attribute "AXSelectedTextRange" if x < y then tell application "TextEdit" to set s to document 1's characters x thru y as text else if x is y then tell application "TextEdit" to set s to document 1's character x end if end if end if get s 97 | snippetType 98 | 2 99 | useCount 100 | 0 101 | uuidString 102 | 0C66F74D-2E5A-464D-B6C6-4AC6EA098441 103 | 104 | 105 | abbreviation 106 | " 107 | abbreviationMode 108 | 0 109 | creationDate 110 | 2012-02-19T02:58:26Z 111 | flags 112 | 0 113 | label 114 | 115 | lastUsed 116 | 2012-02-19T17:44:47Z 117 | modificationDate 118 | 2012-02-19T17:32:50Z 119 | plainText 120 | "%snippet:;seltxt%%|" 121 | snippetType 122 | 0 123 | useCount 124 | 5 125 | uuidString 126 | CF9C4DF4-7975-4F80-9FFE-3B7FE0EAEC77 127 | 128 | 129 | abbreviation 130 | ` 131 | abbreviationMode 132 | 0 133 | creationDate 134 | 2012-02-19T02:58:11Z 135 | flags 136 | 0 137 | label 138 | 139 | lastUsed 140 | 2012-02-19T04:43:45Z 141 | modificationDate 142 | 2012-02-19T17:32:54Z 143 | plainText 144 | `%snippet:;seltxt%%|` 145 | snippetType 146 | 0 147 | useCount 148 | 3 149 | uuidString 150 | 6621CBA6-62C1-476B-B6C3-89AE109BCDC4 151 | 152 | 153 | abbreviation 154 | ( 155 | abbreviationMode 156 | 0 157 | creationDate 158 | 2012-02-19T02:55:11Z 159 | flags 160 | 0 161 | label 162 | 163 | lastUsed 164 | 2012-02-19T05:02:19Z 165 | modificationDate 166 | 2012-02-19T17:32:57Z 167 | plainText 168 | (%snippet:;seltxt%%|) 169 | snippetType 170 | 0 171 | useCount 172 | 8 173 | uuidString 174 | 002E27B8-FB32-4270-83B5-819C2C0A9565 175 | 176 | 177 | abbreviation 178 | [ 179 | abbreviationMode 180 | 0 181 | creationDate 182 | 2012-02-19T02:54:46Z 183 | flags 184 | 0 185 | label 186 | 187 | lastUsed 188 | 2012-02-19T04:43:29Z 189 | modificationDate 190 | 2012-02-19T17:33:01Z 191 | plainText 192 | [%snippet:;seltxt%%|] 193 | snippetType 194 | 0 195 | useCount 196 | 16 197 | uuidString 198 | 6870F0C4-F4B0-4079-BDEC-3D74A4BBFDE2 199 | 200 | 201 | 202 | 203 | --------------------------------------------------------------------------------