File README changed (mode: 100644) (index 9b01e2b..274da38) |
|
1 |
|
### Motivation |
|
2 |
|
|
1 |
3 |
This plugin will automatically fold long preambles, such as GPL copyright |
This plugin will automatically fold long preambles, such as GPL copyright |
2 |
4 |
notices, located at the head of source files. You may find it helpful if, |
notices, located at the head of source files. You may find it helpful if, |
3 |
5 |
like me, you use syntax folding infrequently. |
like me, you use syntax folding infrequently. |
|
... |
... |
functions and read the comments but not the 50 lines of licensing and |
8 |
10 |
copyright notices that head every file. Because these are third-party |
copyright notices that head every file. Because these are third-party |
9 |
11 |
sources, I do not want to modify the files to include Vim fold markers. |
sources, I do not want to modify the files to include Vim fold markers. |
10 |
12 |
|
|
11 |
|
WHAT IT DOES: |
|
|
13 |
|
### What it does |
12 |
14 |
|
|
13 |
15 |
This plugin does not use fold markers and does not modify files. |
This plugin does not use fold markers and does not modify files. |
14 |
16 |
It adds the fold by changing the foldmethod to "manual" and inserting a |
It adds the fold by changing the foldmethod to "manual" and inserting a |
|
... |
... |
not having a comment in the first column. |
25 |
27 |
|
|
26 |
28 |
Note: If the preamble uses 'c' style comments without a border of characters |
Note: If the preamble uses 'c' style comments without a border of characters |
27 |
29 |
in column 1 the preamble will not be recognized. |
in column 1 the preamble will not be recognized. |
|
30 |
|
|
|
31 |
|
### Usage |
|
32 |
|
|
|
33 |
|
For automatic folding, add a line to your .vimrc file, such as: |
|
34 |
|
|
|
35 |
|
```vim |
|
36 |
|
call Preamble#Enable('*.c,*.h,*.cpp,*.hpp,*.cs,*.py') |
|
37 |
|
``` |
|
38 |
|
|
|
39 |
|
For more info on usage and options, use: |
|
40 |
|
|
|
41 |
|
```vim |
|
42 |
|
:help preamble |
|
43 |
|
``` |