• Stars
    star
    284
  • Rank 145,616 (Top 3 %)
  • Language
    Vim Script
  • License
    MIT License
  • Created over 7 years ago
  • Updated almost 2 years ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

Breakdown Vim's --startuptime output

startuptime.vim

startuptime

Everybody knows that 1ms could mean the difference between life and death in Vim. This plugin breaks down the output of --startuptime so you can zero in on the scripts that are stealing dozens of your milliseconds each time Vim is started. You won't even need to leave the comfort of Vim.

Usage

Use the command :StartupTime to get an averaged startup profile. By default, it collects 10 samples.

It accepts multiple arguments. If a number is found, it is used as the sample count. If a filename is found, it will be used with the -u argument while profiling.

Example collecting 100 samples and using ~/foo.vim as the vimrc script:

:StartupTime ~/foo.vim 100

If -- is found in the command arguments, everything after it will be used verbatim in the program execution.

Example collecting 100 samples with manual arguments:

:StartupTime 100 -- -u ~/foo.vim -i NONE -- ~/foo.vim

Note that the first -- is dropped.

To upload the results, you can use a plugin like gist-vim.

Details

You have been able to profile Vim's startup by using the --startuptime argument since v7.2. However, the results are written to a file and it reports timing per loaded script. The output method and results aren't very useful to a layman that just wants to know what plugins are affecting Vim's startup speed.

This plugin takes multiple samples (10 by default) of the --startuptime output and displays the average times broken down by source. A source could be your [vimrc] scripts, Vim's built-in [runtime] scripts, or plugins. Vim doesn't actually have a formal plugin system. As a result, a "plugin" is simply a path found in runtimepath that looks like a plugin. If the source can't be determined, it display as [unknown].

The results shows the total average startup time and the 10 slowest "plugins". Below it are the load times, separated by startup phases and sorted by load time. Under each phase, load times are broken down by "plugin". Under each "plugin" are the load times for individual scripts. These are folded by default and can be opened with zo if you want more detail.

More Repositories

1

tmux2html

🐈 Render full tmux windows or individual panes as HTML
Python
692
star
2

braceless.vim

🐍 Text objects, folding, and more for Python and other indented languages.
Vim Script
392
star
3

django-plus.vim

🎸 Improvements to the handling of Django related files in Vim
Vim Script
178
star
4

helpful.vim

πŸ““ Display vim version numbers in docs
Vim Script
177
star
5

nmux

A multiplexer for Neovim processes
Objective-C
110
star
6

fzf-filemru

File MRU with fzf.vim
Shell
91
star
7

deoplete-clang2

Python
90
star
8

moult

A utility for finding Python packages that may not be in use.
Python
50
star
9

nvim-python-doctor

πŸš‘ Display diagnostic information about Python installations for Neovim
Shell
45
star
10

impsort.vim

Sort and highlight Python imports in Vim
Vim Script
36
star
11

local-indent.vim

Display a guide for the current line's indent level.
Vim Script
32
star
12

hammerspoon-vimouse

Control the mouse with Hammerspoon in a Vim-ish way
Lua
28
star
13

Developer-Profile

A Google Chrome extension that deletes browser data when all windows in a profile are closed.
HTML
25
star
14

exception.vim

Vim plugin for tracing exceptions thrown by VimL scripts.
Vim Script
24
star
15

gofmt.vim

A Vim plugin that runs gofmt when you save
Vim Script
19
star
16

dootfiles

🎡 dootfiles beep boop deet doot 🎡
Vim Script
18
star
17

spellrotate.vim

Cycles spelling suggestions under the cursor
Vim Script
17
star
18

wstrip.vim

Strip trailing whitespace only on changed lines
Vim Script
16
star
19

nvim-api-viewer

Display Neovim API functions in a buffer for reference.
Vim Script
14
star
20

sshclip

Sever/client clipboard over SSH for Neovim
Shell
13
star
21

dyslexic.vim

😭 Find mistyped text by searching for word permutations
Vim Script
13
star
22

haunted.vim

πŸ‘» Scripted automation in Vim using ghosts
Vim Script
13
star
23

osx-autoclean

πŸ—‘οΈ Automatic Directory Cleaning on macOS
Shell
12
star
24

auto_rsync

Automatically rsync a directory watched by fswatch
Shell
11
star
25

anyline.vim

πŸš₯ A highly customizable statusline for Vim
Vim Script
11
star
26

colorpal.vim

Vim theming plugin
Vim Script
10
star
27

hl-goimport.vim

Highlights imported packages in Go
Vim Script
9
star
28

gitbusy.vim

🐝 Stash your Vim session using `git stash` before switching to another branch.
Vim Script
6
star
29

headlines.vim

πŸ“° Quickly edit the top of your source files
Vim Script
5
star
30

luser

Drop-in replacement for os/user in Go
Go
5
star
31

ubuntu-vims

Docker container for builds of Vim from different versions of Ubuntu
5
star
32

nanofish

oh-my-zsh theme
3
star
33

deoplete-server

[WIP] Deoplete server
3
star
34

nvim-checkhealth

:CheckHealth command for older Neovim versions
Vim Script
2
star
35

wstrip-changed.vim

Strip trailing whitespace only on changed lines.
Vim Script
2
star
36

pdfpop

A very simple macOS command line utility for creating PDFs from an existing PDF
Objective-C
2
star
37

zsh-duckduckgo

Get very simple responses from DuckDuckGo in your z-shell
Shell
1
star
38

django-userjs

userjs is a Django application that produces javascript that represents a User object.
Python
1
star
39

shellcolors

Utility for displaying shell colors and finding a close match
Python
1
star