You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
-`b:phpfold_text = 1` - Enable the custom `foldtext` option.
17
+
-`b:phpfold_text_right_lines = 1` - Display the line count on the right instead of the left.
18
+
-`b:phpfold_text_percent = 0` - Display the percentage of lines the fold represents.
17
19
18
20
Installation
19
21
------------
@@ -32,6 +34,53 @@ Installation
32
34
1. Add `Plug 'swekaj/php-foldexpr.vim'` to .vimrc
33
35
2. Run `:PlugInstall`
34
36
37
+
Option Effects
38
+
--------------
39
+
There are two options for customizing how the fold text displays: `b:phpfold_text_right_lines` and `b:phpfold_text_percent`.
40
+
41
+
When `b:phpfold_text_right_lines` is true, the number of lines folded along with the dashes that indicate the fold level are aligned on the right side of the screen.
42
+
*`b:phpfold_text_right_lines = 0`:*
43
+
```
44
+
class ClassName
45
+
{
46
+
+-- 4 lines: public foo() {...}-------------------------------------------
47
+
+-- 6 lines: public bar() {...}-------------------------------------------
48
+
+-- 12 lines: public baz() {...}-------------------------------------------
49
+
}
50
+
```
51
+
52
+
*`b:phpfold_text_right_lines = 1`:*
53
+
```
54
+
class ClassName
55
+
{
56
+
public foo() {...}---------------------------------------- 4 lines +--
57
+
public bar() {...}---------------------------------------- 6 lines +--
58
+
public baz() {...}---------------------------------------- 12 lines +--
59
+
}
60
+
```
61
+
62
+
When `b:phpfold_text_percent` is true, the percentage of the total lines the fold represents is displayed alongside the line count:
63
+
*`b:phpfold_text_right_lines = 0`:*
64
+
```
65
+
class ClassName
66
+
{
67
+
+-- 2 lines [ 8%]: public foo() {...}-------------------------------------
68
+
+-- 8 lines [32%]: public bar() {...}-------------------------------------
69
+
+-- 12 lines [48%]: public baz() {...}-------------------------------------
70
+
}
71
+
```
72
+
73
+
*`b:phpfold_text_right_lines = 1`:*
74
+
```
75
+
class ClassName
76
+
{
77
+
public foo() {...}---------------------------------- 2 lines [ 8%] +--
78
+
public bar() {...}---------------------------------- 8 lines [32%] +--
79
+
public baz() {...}---------------------------------- 12 lines [48%] +--
0 commit comments