Skip to content

Commit f8bb8c3

Browse files
committed
Update .clinerules
1 parent 1b5ec1f commit f8bb8c3

File tree

1 file changed

+28
-18
lines changed

1 file changed

+28
-18
lines changed

.clinerules

+28-18
Original file line numberDiff line numberDiff line change
@@ -8,9 +8,17 @@
88
- For example: `const filetype = get(a:000, 0, v:null)`
99
- Don't use `==`. Use `==#` instead
1010
- Make the tests if you add new features
11+
- Don't define unnecessary `-nargs=0` in the command definition
1112

1213
## doc
1314

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+
1422
1. Text Formatting
1523
- Normal descriptions are not indented
1624
- One line should not exceed 78 characters (including tabs)
@@ -24,33 +32,35 @@
2432
- Empty lines are used to separate logical sections
2533

2634
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
2838
- Surround code blocks with `>` and `<`
2939
- Group related commands in the same block
3040
- Add descriptive comments starting with `"`
3141
- Empty lines between command groups are allowed for clarity
3242

3343
Example:
3444
```help
35-
*:FooCommand*
45+
[TAB][TAB][TAB][TAB][TAB][TAB]:FooCommand* | ← [TAB] represents a real tab character. Also Vim indexes must be indented
3646
: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
4555

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).
5161
>
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
5565
<
5666
```

0 commit comments

Comments
 (0)