1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
|
# Appendix
## Key Bindings
Linux / Win32 | Mac OSX | Command |
--------------|---------|---------|
**File** |||
Ctrl+N |⌘N |New file
Ctrl+O |⌘O |Open file
Ctrl+Alt+O |⌘⌥O |Open recent file...
Ctrl+Shift+O|⌘⇧O |Reload file
Ctrl+S |⌘S |Save file
Ctrl+Shift+S|⌘⇧S |Save file as..
Ctrl+W |⌘W |Close file
Ctrl+Shift+W|⌘⇧W |Close all files
None |None|Load session...
None |None|Load session...
Alt+Q |⌘Q |Quit
**Edit** |||
Ctrl+Z<br/>Alt+Backspace|⌘Z |Undo
Ctrl+Y<br/>Ctrl+Shift+Z |⌘⇧Z |Redo
Ctrl+X<br/>Shift+Del |⌘X<br/>⇧⌦|Cut
Ctrl+C<br/>Ctrl+Ins |⌘C |Copy
Ctrl+V<br/>Shift+Ins |⌘V |Paste
Ctrl+D |⌘D |Duplicate line
Del |⌦<br/>^D |Delete
Ctrl+A |⌘A |Select all
Ctrl+M |^M |Match brace
Ctrl+Enter |^⎋ |Complete word
Alt+Del |^⌦ |Delete word
Ctrl+Alt+Shift+H |⌘⇧H |Highlight word
Ctrl+/ |^/ |Toggle block comment
Ctrl+T |^T |Transpose characters
Ctrl+Shift+J |^J |Join lines
Ctrl+Shift+M |^⇧M |Select to matching brace
Ctrl+< |⌘< |Select between XML tags
Ctrl+> |⌘> |Select in XML tag
Ctrl+" |⌘" |Select in double quotes
Ctrl+' |⌘' |Select in single quotes
Ctrl+( |⌘( |Select in parentheses
Ctrl+[ |⌘[ |Select in brackets
Ctrl+{ |⌘{ |Select in braces
Ctrl+Shift+D |⌘⇧D |Select word
Ctrl+Shift+L |⌘⇧L |Select line
Ctrl+Shift+P |⌘⇧P |Select paragraph
Ctrl+Shift+I |⌘⇧I |Select indented block
Ctrl+Y |⌘⇧Y |Select style
Ctrl+Alt+U |^U |Upper case selection
Ctrl+Alt+Shift+U |^⇧U |Lower case selection
Alt+< |^< |Enclose as XML tags
Alt+> |^> |Enclose as single XML tag
Alt+" |^" |Enclose in double quotes
Alt+' |^' |Enclose in single quotes
Alt+( |^( |Enclose in parentheses
Alt+[ |^[ |Enclose in brackets
Alt+{ |^{ |Enclose in braces
Ctrl++ |⌘+ |Grow selection by 1 on either side
Ctrl+\_ |⌘\_ |Shrink selection by 1 on either side
Ctrl+Shift+Up |^⇧⇡ |Move selected lines up
Ctrl+Shift+Down |^⇧⇣ |Move selected lines down
**Search** |||
Ctrl+F |⌘F |Find
Ctrl+G<br/>F3 |⌘G |Find next
Ctrl+Shift+G<br/>Shift+F3|⌘⇧G |Find previous
Ctrl+Alt+R |^R |Replace
Ctrl+Alt+Shift+R |^⇧R |Replace all
Ctrl+Alt+F |⌘⌥F |Find incremental
Ctrl+Shift+F |⌘⇧F |Find in files
Ctrl+Alt+G |⌘⌥G |Goto next file found
Ctrl+Alt+Shift+G |⌘⌥⇧G|Goto previous file found
Ctrl+J |⌘J |Jump to line
**Tools** |||
Ctrl+E |⌘E |Command entry
Ctrl+Shift+E |⌘⇧E |Select command
Ctrl+R |⌘R |Run
Ctrl+Shift+R |⌘⇧R |Compile
Ctrl+| |⌘||Filter text through
Ctrl+Space |⌥⎋ |Complete symbol
Ctrl+H |^H |Show documentation
Tab |⇥ |Expand snippet or next placeholder
Ctrl+K |⌥⇥ |Insert snippet...
Shift+Tab |⇧⇥ |Previous snippet placeholder
Ctrl+Shift+K |⌥⇧⇥ |Cancel snippet
Ctrl+F2 |⌘F2 |Toggle bookmark
Ctrl+Shift+F2 |⌘⇧F2 |Clear bookmarks
F2 |F2 |Next bookark
Shift+F2 |⇧F2 |Previous bookmark
Alt+F2 |⌥F2 |Goto bookmark...
Ctrl+U |⌘U |Snapopen `_USERHOME`
None |None |Snapopen `_HOME`
Ctrl+Alt+Shift+O|⌘⌥⇧O |Snapopen current directory
Ctrl+I |⌘I |Show style
**Buffer** |||
Ctrl+Tab |^\` |Next buffer
Ctrl+Shift+Tab |^~ |Previous buffer
Ctrl+B |⌘B |Switch to buffer...
None |None |Tab width: 2
None |None |Tab width: 3
None |None |Tab width: 4
None |None |Tab width: 8
Ctrl+Alt+Shift+T|^⇧T |Toggle use tabs
Ctrl+Alt+I |^I |Convert indentation
None |None |`CRLF` EOL mode
None |None |`CR` EOL mode
None |None |`LF` EOL mode
None |None |`UTF-8` encoding
None |None |`ASCII` encoding
None |None |`ISO-8859-1` encoding
None |None |`UTF-16` encoding
Ctrl+Alt+L |⌘⌥L |Select lexer...
F5 |F5 |Refresh syntax highlighting
**View** |||
Ctrl+Alt+Tab |^⇥ |Next view
Ctrl+Alt+Shift+Tab |^⇧⇥ |Previous view
Ctrl+Alt+Shift+S |^⇧S |Split view vertical
Ctrl+Alt+S |^S |Split view horizontal
Ctrl+Alt+W |^W |Unsplit view
Ctrl+Alt+Shift+W |^⇧W |Unsplit all views
Ctrl+Alt++<br/>Ctrl+Alt+=|^+<br/>^=|Grow view
Ctrl+Alt+- |^- |Shrink view
None |None |Toggle current fold
Ctrl+Alt+Enter |^↩ |Toggle view EOL
Ctrl+Alt+\\ |^\\ |Toggle wrap mode
Ctrl+Alt+Shift+I |^⇧I |Toggle show indent guides
Ctrl+Alt+Space |^Space |Toggle view whitespace
Ctrl+Alt+Shift+V |^⇧V |Toggle virtual space
Ctrl+= |⌘= |Zoom in
Ctrl+- |⌘- |Zoom out
Ctrl+0 |⌘0 |Reset zoom
**Help** |||
F1 |F1 |Open manual
Shift+F1|⇧F1 |Open LuaDoc
None |None|About
**Movement** |||
Down |⇣<br/>^N |Line down
Shift+Down |⇧⇣<br/>^⇧N |Line down extend selection
Ctrl+Down |^⇣ |Scroll line down
Alt+Shift+Down |⌥⇧⇣ |Line down extend rect. selection
Up |⇡<br/>^P |Line up
Shift+Up |⇧⇡<br/>^⇧P |Line up extend selection
Ctrl+Up |^⇡ |Scroll line up
Alt+Shift+Up |⌥⇧⇡ |Line up extend rect. selection
Left |⇠<br/>^B |Char left
Shift+Left |⇧⇠<br/>^⇧B |Char left extend selection
Ctrl+Left |^⇠<br/>^⌥B |Word left
Ctrl+Shift+Left |^⇧⇠<br/>^⌥⇧B|Word left extend selection
Alt+Shift+Left |⌥⇧⇠ |Char left extend rect. selection
Right |⇢<br/>^F |Char right
Shift+Right |⇧⇢<br/>^⇧F |Char right extend selection
Ctrl+Right |^⇢<br/>^⌥F |Word right
Ctrl+Shift+Right |^⇧⇢<br/>^⌥⇧F|Word right extend selection
Alt+Shift+Right |⌥⇧⇢ |Char right extend rect. selection
Home |⌘⇠<br/>^A |Line start
Shift+Home |⌘⇧⇠<br/>^⇧A |Line start extend selection
Ctrl+Home |⌘⇡<br/>⌘↖ |Document start
Ctrl+Shift+Home |⌘⇧⇡<br/>⌘⇧↖ |Document start extend selection
Alt+Shift+Home |⌥⇧↖ |Line start extend rect. selection
End |⌘⇢<br/>^E |Line end
Shift+End |⌘⇧⇢<br/>^⇧E |Line end extend selection
Ctrl+End |⌘⇣<br/>⌘↘ |Document end
Ctrl+Shift+End |⌘⇧⇣<br/>⌘⇧↘ |Document end extend selection
Alt+Shift+End |⌥⇧↘ |Line end extend rect. selection
PageUp |⇞ |Page up
Shift+PageUp |⇧⇞ |Page up extend selection
Alt+Shift+PageUp |⌥⇧⇞ |Page up extend rect. selection
PageDown |⇟ |Page down
Shift+PageDown |⇧⇟ |Page down extend selection
Alt+Shift+PageDown |⌥⇧⇟ |Page down extend rect. selection
Ctrl+Del |⌘⌦ |Delete word right
Ctrl+Shift+Del |⌘⇧⌦ |Delete line right
Ins |Ins |Toggle overtype
Backspace<br/>Shift+Backspace|⌫<br/>⇧⌫ |Delete back
Ctrl+Backspace |⌘⌫ |Delete word left
Ctrl+Shift+Backspace |⌘⇧⌫ |Delete line left
Tab |⇥ |Insert tab or indent
Shift+Tab |⇧⇥ |Dedent
None |^K |Cut to line end
None |^L |Center line vertically
**Other** |||
Ctrl+Shift+U, xxxx, Enter|None|Input Unicode character U-xxxx.
## Lua Patterns
The following is taken from the
[Lua 5.1 Reference Manual](http://www.lua.org/manual/5.1/manual.html#5.4.1).
_Character Class:_
A character class is used to represent a set of characters. The following
combinations are allowed in describing a character class:
* **_`x`_:** (where _x_ is not one of the magic characters `^$()%.[]*+-?`)
represents the character _x_ itself.
* **`.`:** (a dot) represents all characters.
* **`%a`:** represents all letters.
* **`%c`:** represents all control characters.
* **`%d`:** represents all digits.
* **`%l`:** represents all lowercase letters.
* **`%p`:** represents all punctuation characters.
* **`%s`:** represents all space characters.
* **`%u`:** represents all uppercase letters.
* **`%w`:** represents all alphanumeric characters.
* **`%x`:** represents all hexadecimal digits.
* **`%z`:** represents the character with representation 0.
* **`%`_`x`_:** (where _x_ is any non-alphanumeric character) represents the
character _x_. This is the standard way to escape the magic characters. Any
punctuation character (even the non magic) can be preceded by a '`%`' when
used to represent itself in a pattern.
* **`[set]`:** represents the class which is the union of all characters in set.
A range of characters can be specified by separating the end characters of the
range with a '`-`'. All classes `%`_x_ described above can also be used as
components in set. All other characters in set represent themselves. For
example, `[%w_]` (or `[_%w]`) represents all alphanumeric characters plus the
underscore, `[0-7]` represents the octal digits, and `[0-7%l%-]` represents
the octal digits plus the lowercase letters plus the '`-`' character.
<br /><br />
The interaction between ranges and classes is not defined. Therefore, patterns
like `[%a-z]` or `[a-%%]` have no meaning.
* **`[^set]`:** represents the complement of _set_, where _set_ is interpreted
as above.
For all classes represented by single letters (`%a`, `%c`, etc.), the
corresponding uppercase letter represents the complement of the class. For
instance, `%S` represents all non-space characters.
The definitions of letter, space, and other character groups depend on the
current locale. In particular, the class `[a-z]` may not be equivalent to `%l`.
_Pattern Item:_
A _pattern item_ can be
* a single character class, which matches any single character in the class;
* a single character class followed by '`*`', which matches 0 or more
repetitions of characters in the class. These repetition items will always
match the longest possible sequence;
* a single character class followed by '`+`', which matches 1 or more
repetitions of characters in the class. These repetition items will always
match the longest possible sequence;
* a single character class followed by '`-`', which also matches 0 or more
repetitions of characters in the class. Unlike '`*`', these repetition items
will always match the _shortest_ possible sequence;
* a single character class followed by '`?`', which matches 0 or 1 occurrence of
a character in the class;
* `%n`, for _n_ between 1 and 9; such item matches a substring equal to the
_n_-th captured string (see below);
* `%bxy`, where _x_ and _y_ are two distinct characters; such item matches
strings that start with _x_, end with _y_, and where the _x_ and _y_ are
balanced. This means that, if one reads the string from left to right,
counting +_1_ for an _x_ and -_1_ for a _y_, the ending _y_ is the first _y_
where the count reaches 0. For instance, the item `%b()` matches expressions
with balanced parentheses.
_Pattern:_
A _pattern_ is a sequence of pattern items. A '`^`' at the beginning of a
pattern anchors the match at the beginning of the subject string. A '`$`' at the
end of a pattern anchors the match at the end of the subject string. At other
positions, '`^`' and '`$`' have no special meaning and represent themselves.
_Captures:_
A pattern can contain sub-patterns enclosed in parentheses; they describe
_captures_. When a match succeeds, the substrings of the subject string that
match captures are stored (_captured_) for future use. Captures are numbered
according to their left parentheses. For instance, in the pattern
`"(a*(.)%w(%s*))"`, the part of the string matching `"a*(.)%w(%s*)"` is stored
as the first capture (and therefore has number 1); the character matching "`.`"
is captured with number 2, and the part matching "`%s*`" has number 3.
As a special case, the empty capture `()` captures the current string position
(a number). For instance, if we apply the pattern `"()aa()"` on the string
`"flaaap"`, there will be two captures: 3 and 5.
A pattern cannot contain embedded zeros. Use `%z` instead.
|