Skip to content

Commit 0c70f47

Browse files
committed
Update README with configuration options.
1 parent 3d0819f commit 0c70f47

File tree

1 file changed

+27
-2
lines changed

1 file changed

+27
-2
lines changed

README.md

Lines changed: 27 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,8 @@ Launch `vim-startuptime` with `:StartupTime`. Press `<space>` on events to get
3737
additional information. The key sequence for additional information can be customized
3838
(see *Configuration* below).
3939

40+
### Arguments
41+
4042
`:StartupTime` takes the following optional arguments.
4143

4244
```vim
@@ -55,7 +57,9 @@ events are included.
5557
are included.
5658
* `--self` and `--no-self` specify whether to use *self* timings for *sourced
5759
script* events (otherwise, *self+sourced* timings are used).
58-
* `--tries` specifies how many launch times are averaged.
60+
* `--tries` specifies how many startup times are averaged.
61+
62+
### Modifiers
5963

6064
`:StartupTime` accepts the following modifiers.
6165

@@ -64,6 +68,8 @@ script* events (otherwise, *self+sourced* timings are used).
6468
* `:belowright` or `:rightbelow`
6569
* `:vertical`
6670

71+
### Vim Options
72+
6773
`:StartupTime` observes the following options, but these are overruled by
6874
modifiers above.
6975

@@ -72,14 +78,33 @@ modifiers above.
7278

7379
## Configuration
7480

75-
# TODO
81+
The following variables can be used to customize the behavior of `vim-startuptime`.
82+
The `:StartupTime` optional arguments have higher precedence than these options.
83+
84+
| Variable | Default | Description |
85+
|-----------------------------------|-----------------------|-------------------------------------------------------------------|
86+
| `g:startuptime_more_info_key_seq` | `<space>` | Key sequence for getting more information |
87+
| `g:startuptime_exe_path` | running vim `argv[0]` | Path to `vim` for startup timing |
88+
| `g:startuptime_exe_args` | `[]` | Optional arguments to pass to `vim` |
89+
| `g:startuptime_sort` | `1` | Specifies whether events are sorted |
90+
| `g:startuptime_tries` | `1` | Specifies how many startup times are averaged |
91+
| `g:startuptime_sourced_events` | `1` | Specifies whether *sourced script* events are included |
92+
| `g:startuptime_other_events` | `1` | Specifies whether *other lines* events are included |
93+
| `g:startuptime_self` | `0` | Specify whether to use *self* timings for *sourced script* events |
94+
| `g:startuptime_event_width` | `20` | Event column width |
95+
| `g:startuptime_time_width` | `6` | Time column width |
96+
| `g:startuptime_percent_width` | `7` | Percent column width |
97+
| `g:startuptime_plot_width` | `26` | Plot column width |
98+
| `g:startuptime_colorize` | `1` | |
7699

77100
The variables can be customized in your `.vimrc`, as shown in the following
78101
example.
79102

80103
```vim
81104
let g:startuptime_sort = 0
82105
let g:startuptime_tries = 5
106+
let g:startuptime_exe_args = ['-u', '~/.vim/.vimrc']
107+
```
83108

84109
The following highlight groups can be configured to change `vim-startuptime`'s
85110
colors.

0 commit comments

Comments
 (0)