Skip to content

Commit 3d0819f

Browse files
committed
Started working on README.
1 parent d7863b5 commit 3d0819f

File tree

2 files changed

+121
-2
lines changed

2 files changed

+121
-2
lines changed

README.md

Lines changed: 120 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1,120 @@
1-
# vim-startuptime
1+
# vim-startuptime
2+
3+
`vim-startuptime` is a Vim plugin for viewing startup timing information. The
4+
plugin is customizable (see *Configuration* below).
5+
6+
<img src="https://github.com/dstein64/vim-startuptime/blob/master/screenshot.png?raw=true" width="800"/>
7+
8+
## Requirements
9+
10+
* `vim>=8.0.1453` or `nvim>=0.2.2`
11+
- `vim-startuptime` may work on earlier versions, but has not been tested.
12+
13+
## Installation
14+
15+
Use one of the following package managers:
16+
17+
* [Vim8 packages][vim8pack]:
18+
- `git clone https://github.com/dstein64/vim-startuptime ~/.vim/pack/plugins/start/vim-startuptime`
19+
* [Vundle][vundle]:
20+
- Add `Plugin 'dstein64/vim-startuptime'` to `~/.vimrc`
21+
- `:PluginInstall` or `$ vim +PluginInstall +qall`
22+
* [Pathogen][pathogen]:
23+
- `git clone --depth=1 https://github.com/dstein64/vim-startuptime ~/.vim/bundle/vim-startuptime`
24+
* [vim-plug][vimplug]:
25+
- Add `Plug 'dstein64/vim-startuptime'` to `~/.vimrc`
26+
- `:PlugInstall` or `$ vim +PlugInstall +qall`
27+
* [dein.vim][dein]:
28+
- Add `call dein#add('dstein64/vim-startuptime')` to `~/.vimrc`
29+
- `:call dein#install()`
30+
* [NeoBundle][neobundle]:
31+
- Add `NeoBundle 'dstein64/vim-startuptime'` to `~/.vimrc`
32+
- Re-open vim or execute `:source ~/.vimrc`
33+
34+
## Usage
35+
36+
Launch `vim-startuptime` with `:StartupTime`. Press `<space>` on events to get
37+
additional information. The key sequence for additional information can be customized
38+
(see *Configuration* below).
39+
40+
`:StartupTime` takes the following optional arguments.
41+
42+
```vim
43+
:StartupTime
44+
\ [--sort] [--no-sort]
45+
\ [--sourced-events] [--no-sourced-events]
46+
\ [--other-events] [--no-other-events]
47+
\ [--self] [--no-self]
48+
\ [--tries INT]
49+
```
50+
51+
* `--sort` and `--no-sort` specify whether events are sorted.
52+
* `--sourced-events` and `--no-sourced-events` specify whether *sourced script*
53+
events are included.
54+
* `--other-events` and `--no-other-events` specify whether *other lines* events
55+
are included.
56+
* `--self` and `--no-self` specify whether to use *self* timings for *sourced
57+
script* events (otherwise, *self+sourced* timings are used).
58+
* `--tries` specifies how many launch times are averaged.
59+
60+
`:StartupTime` accepts the following modifiers.
61+
62+
* `:tab`
63+
* `:aboveleft` or `:leftabove`
64+
* `:belowright` or `:rightbelow`
65+
* `:vertical`
66+
67+
`:StartupTime` observes the following options, but these are overruled by
68+
modifiers above.
69+
70+
* `'splitbelow''`
71+
* `'splitright''`
72+
73+
## Configuration
74+
75+
# TODO
76+
77+
The variables can be customized in your `.vimrc`, as shown in the following
78+
example.
79+
80+
```vim
81+
let g:startuptime_sort = 0
82+
let g:startuptime_tries = 5
83+
84+
The following highlight groups can be configured to change `vim-startuptime`'s
85+
colors.
86+
87+
| Name | Default | Description |
88+
|----------------------------|--------------|--------------------------------|
89+
| `StartupTimeHeader` | `ModeMsg` | Color for the header row text |
90+
| `StartupTimeSourcingEvent` | `Type` | Color for sourcing event names |
91+
| `StartupTimeOtherEvent` | `Identifier` | Color for other event names |
92+
| `StartupTimeTime` | `Directory` | Color for the time column |
93+
| `StartupTimePercent` | `Special` | Color for the percent column |
94+
| `StartupTimePlot` | `Normal` | Color for the plot column |
95+
96+
The highlight groups can be customized in your `.vimrc`, as shown in the
97+
following example.
98+
99+
```vim
100+
" Link WinActive highlight to Error highlight
101+
highlight link StartupTimeSourcingEvent Title
102+
103+
" Specify custom highlighting for WinInactive
104+
highlight StartupTimeTime
105+
\ term=bold ctermfg=12 ctermbg=159 guifg=Blue guibg=LightCyan
106+
```
107+
108+
License
109+
-------
110+
111+
The source code has an [MIT License](https://en.wikipedia.org/wiki/MIT_License).
112+
113+
See [LICENSE](https://github.com/dstein64/vim-startuptime/blob/master/LICENSE).
114+
115+
[dein]: https://github.com/Shougo/dein.vim
116+
[neobundle]: https://github.com/Shougo/neobundle.vim
117+
[pathogen]: https://github.com/tpope/vim-pathogen
118+
[vim8pack]: http://vimhelp.appspot.com/repeat.txt.html#packages
119+
[vimplug]: https://github.com/junegunn/vim-plug
120+
[vundle]: https://github.com/gmarik/vundle

autoload/startuptime.vim

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -550,7 +550,7 @@ endfunction
550550

551551
" Usage:
552552
" :StartupTime
553-
" \ [--sort] [--nosort]
553+
" \ [--sort] [--no-sort]
554554
" \ [--sourced-events] [--no-sourced-events]
555555
" \ [--other-events] [--no-other-events]
556556
" \ [--self] [--no-self]

0 commit comments

Comments
 (0)