forked from VsVim/VsVim
-
Notifications
You must be signed in to change notification settings - Fork 0
/
CodingGuidelines.txt
49 lines (45 loc) · 1.7 KB
/
CodingGuidelines.txt
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
F#
- Terminology
- Last is inclusive
- End is not inclusive
- Util classes should contain Create methods to create
- Revisit: Util classes should have Get for conversions
- Should be Of for type conversions in util classes
EditSnapshotSpan.OfSpan
EditSnapshotSpan.OfBlock
- Editor APIs
- APIs taking a count should return an option or explicitly guard against count being too large. Users
too often control this number
- APIs taking a line number should consider returning an option. Line numbers are less likely to be controlled
by the user
- Don't use ; for multi-line object initializers
- Add a space between ...
- Values and arithmic operators and comparisions
- Names and Values in record initializer expressions
- Names and their types (foo : bar)
- Keywords and open parens
with get (
if (
elif (
- Discriminated Union Names and open parens
- {} the values in a record initializer
- Don't add a space between
- Parens in everything but after keywords and discriminated union values
x.Foo()
- After the get in a mutable property defenition
with get() =
- To Deteremine:
- Should functions returning an option be prefixed with Try? Example KeyNotationUtil
- Naming patterns
- Information needed to iniate an action: XXXData
- Information
C#
- Member variables prefixed with _
- Buffer creation methods should be Create. Not CreateBuffer
Naming
- Fields of specific types
- ITextView -> _textView
- ITextBuffer -> _textBuffer
- IVimBuffer -> _buffer
- Unit Tests for handling a key combination
- Handle_KeyCombo_