Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Newer
Older
100644 47 lines (30 sloc) 2.526 kB
4384ec0 • created a text file with some conventions
duff authored
1
2 Key bindings
3 ============
4
5 If a key is appropriate, language grammars should have ctrl-shift-option as modifier, and the first letter of the language name as key.
6
7 Other bundle items should generally have ctrl-shift as modifier.
8
9 These keys are often specialized for a language:
10
11 command-B -- build
12 command-R -- run
c9f10df • change F3 (for documentation for word) to ctrl-H
duff authored
13 ctrl-H -- lookup current word/selection in the documentation
4384ec0 • created a text file with some conventions
duff authored
14 ctrl-shift-V -- validate (show syntactical errors)
15 ctrl-shift-W -- wrap selection (e.g. in begin/end tags for HTML)
c11d1fb • add note about shift-return
duff authored
16 shift-return -- create a function/method body with previous word as name
4384ec0 • created a text file with some conventions
duff authored
17 ctrl-return -- insert a “descriptive” return (e.g. \n in strings, <br> in HTML)
18 cmd-return -- move to end of line and insert a newline (this is not specialized)
19 cmd-option-return -- move to end of line and insert potential end-of-line symbol (; in many sources, . in prose)
20 cmd-shift-return -- as cmd-option-return, but also insert a newline
21 enter -- insert a newline and start a new “item” (e.g. line comment, bullet point, etc.)
22
c9f10df • change F3 (for documentation for word) to ctrl-H
duff authored
23 Naming Bundle Items
24 ===================
25
26 Bundle items should use Title Case.
27
28 Avoid repeating the name of the bundle in the command name. For example under Ruby we have Run Script and not Run Ruby Script and under Xcode we have Build, not Build Xcode Project, etc.
29
30 Be concise in the name, i.e. make it evident what the command does without writing a page full of information. Refrain from using abbreviations.
31
4384ec0 • created a text file with some conventions
duff authored
32 Snippets
33 ========
34
35 Use tabs instead of spaces in snippets (if the user uses spaces as tabs, TM will convert the snippet when inserted).
36
37 Generally fill in default text in placeholders. This is a cue both to where the placeholders (tab stops) are, and what value they're likely to take.
38
39 Name the snippet after what it inserts, using “..” for placeholders and put the (potential) tab-trigger in parentheses. If it inserts a lot, either name it after the start of what's inserted, or find a descriptive name for what it inserts.
40
41 Choose a tab-trigger which you can remember in half a year. I.e. normally use the first word of what's being inserted instead of an abbreviation. This will make it easier to remember, and it also allows expansion even if the user started to type the actual construct, before remembering the snippet.
42
43 Language grammars
44 =================
45
46 When you put comments in these, please add your name if it's stating a problem, asking a question etc.
Something went wrong with that request. Please try again.