|
8 | 8 | - For example: `const filetype = get(a:000, 0, v:null)`
|
9 | 9 | - Don't use `==`. Use `==#` instead
|
10 | 10 | - Make the tests if you add new features
|
| 11 | +- Don't define unnecessary `-nargs=0` in the command definition |
11 | 12 |
|
12 | 13 | ## doc
|
13 | 14 |
|
| 15 | +0. MOST IMPORTANT RULES - NEVER BREAK THESE |
| 16 | + - NEVER change existing spacing or tabs |
| 17 | + - NEVER modify text unrelated to the current task |
| 18 | + - NEVER add indentation to empty lines |
| 19 | + - NEVER add unnecessary tabs or spaces to existing text |
| 20 | + - Empty lines must be completely empty (no spaces, no tabs) |
| 21 | + |
14 | 22 | 1. Text Formatting
|
15 | 23 | - Normal descriptions are not indented
|
16 | 24 | - One line should not exceed 78 characters (including tabs)
|
|
24 | 32 | - Empty lines are used to separate logical sections
|
25 | 33 |
|
26 | 34 | 3. Code Examples
|
27 |
| - - Use tab characters for indentation inside code blocks |
| 35 | + - IMPORTANT: Always use real tab characters for indentation inside code blocks |
| 36 | + - Space characters are NOT allowed for indentation |
| 37 | + - Each line between `>` and `<` MUST be indented with tab |
28 | 38 | - Surround code blocks with `>` and `<`
|
29 | 39 | - Group related commands in the same block
|
30 | 40 | - Add descriptive comments starting with `"`
|
31 | 41 | - Empty lines between command groups are allowed for clarity
|
32 | 42 |
|
33 | 43 | Example:
|
34 | 44 | ```help
|
35 |
| - *:FooCommand* |
| 45 | +[TAB][TAB][TAB][TAB][TAB][TAB]:FooCommand* | ← [TAB] represents a real tab character. Also Vim indexes must be indented |
36 | 46 | :FooCommand [arg1] [arg2]
|
37 |
| - Opens a new foo with specified arguments. |
38 |
| - |
39 |
| - [arg1] is an optional argument: |
40 |
| - - When omitted: Uses default value |
41 |
| - - Otherwise: Uses specified value |
42 |
| -> |
43 |
| - " Basic usage |
44 |
| - :FooCommand |
| 47 | +[TAB]Opens a new foo with specified arguments. | ← Description is indented with a tab |
| 48 | + | ← Empty line is completely empty. Must not contain any spaces or tabs |
| 49 | +[TAB][arg1] is an optional argument: |
| 50 | +[TAB] - When omitted: Uses default value |
| 51 | +[TAB] - Otherwise: Uses specified value |
| 52 | +> | ← Heading '<' character means starting of code block |
| 53 | +[TAB]" Basic usage | ← Every line inside code block must be indented with tab |
| 54 | +[TAB]:FooCommand |
45 | 55 |
|
46 |
| - " With specific arguments |
47 |
| - :FooCommand value |
48 |
| - :FooCommand value1 value2 |
49 |
| -< |
50 |
| -The buffer is opened with certain properties: |
| 56 | +[TAB]" With arguments | ← Comments are also indented with tab |
| 57 | +[TAB]:FooCommand value |
| 58 | +[TAB]:FooCommand value1 value2 |
| 59 | +< | ← Heading '>' character means ending of code block |
| 60 | +[TAB]Notice the empty lines above and below are completely empty (no spaces or tabs). |
51 | 61 | >
|
52 |
| - " Default settings |
53 |
| - setlocal setting1 |
54 |
| - setlocal setting2 |
| 62 | +" Buffer settings | ← Another code block example |
| 63 | +[TAB]setlocal setting1 |
| 64 | +[TAB]setlocal setting2 | ← Each line has exactly one tab indent |
55 | 65 | <
|
56 | 66 | ```
|
0 commit comments