Vim Startuptime

A small Go program for better `vim --startuptime` alternative
Alternatives To Vim Startuptime
Project NameStarsDownloadsRepos Using ThisPackages Using ThisMost Recent CommitTotal ReleasesLatest ReleaseOpen IssuesLicenseLanguage
Fzf51,212852 days ago62April 17, 2021309mitGo
:cherry_blossom: A command-line fuzzy finder
Awesome Cheatsheets32,908
6 days ago85mitJavaScript
👩‍💻👨‍💻 Awesome cheatsheets for popular programming languages, frameworks and development tools. They include everything you should know in one single file.
Vim Plug30,289
2 months ago120mitVim Script
:hibiscus: Minimalist Vim Plugin Manager
Vim Fugitive17,309
5 days ago28Vim Script
fugitive.vim: A Git wrapper so awesome, it should be illegal
Nnn16,028
9 hours ago20July 26, 20224bsd-2-clauseC
n³ The unorthodox terminal file manager
Ranger13,090
9 hours ago823gpl-3.0Python
A VIM-inspired filemanager for the console
Fzf.vim8,723
17 days ago335mitVim Script
fzf :heart: vim
Ideavim7,414
3 days ago7mitKotlin
IdeaVim – A Vim engine for JetBrains IDEs
Dev Setup5,802
7 months ago34otherPython
macOS development environment setup: Easy-to-understand instructions with automated setup scripts for developer tools like Vim, Sublime Text, Bash, iTerm, Python data analysis, Spark, Hadoop MapReduce, AWS, Heroku, JavaScript web development, Android development, common data stores, and dev-based OS X defaults.
Nb5,206
a month ago281June 12, 202298agpl-3.0Shell
CLI and local web plain text note‑taking, bookmarking, and archiving with linking, tagging, filtering, search, Git versioning & syncing, Pandoc conversion, + more, in a single portable script.
Alternatives To Vim Startuptime
Select To Compare


Alternative Project Comparisons
Readme

Better vim --startuptime

CI Badge Codecov Status

vim-startuptime is a small Go program to measure startup time of Vim. This program aims to be an alternative of --startuptime option of Vim, which measures the startup time metrics to allow vimmers to optimize Vim's startup.

After warm-up, vim-startuptime runs vim --startuptime multiple times internally and collects the metrics from the results (e.g. average time for loading each plugin's scripts). The summary calculated from the measurements is output to stdout.

Tested on Linux, Mac and Windows with both Vim and Neovim.

Installation

Download an executable from a release page.

If you want to install the latest stable version, please run following command. Go toolchain is necessary for running the command.

$ go install github.com/rhysd/[email protected]

Requirements

  • vim 7.4.1444 or later (for --not-a-term startup option)
  • nvim

Usage

Just run the command with no argument.

$ vim-startuptime

By default, it tries to run vim and :quit immediately 10 times, collects the results and outputs a summary of them to stdout.

Extra options: []
Measured: 10 times

Total Average: 189.954400 msec
Total Max:     198.062000 msec
Total Min:     183.966000 msec

  AVERAGE        MAX       MIN
-------------------------------
98.532900 102.605000 94.275000: $HOME/.vimrc
51.859600  56.937000 49.897000: opening buffers
17.027900  18.810000 16.277000: /Users/rhysd/.vim/bundle/vim-color-spring-night/colors/spring-night.vim
11.878900  13.153000 10.567000: /Users/rhysd/.vim/bundle/vim-smartinput/autoload/smartinput.vim
 9.407600  11.710000  8.606000: /usr/local/Cellar/macvim/HEAD-0db36ff_1/MacVim.app/Contents/Resources/vim/runtime/filetype.vim

...(snip)

 0.009100   0.012000  0.007000: window checked
 0.009000   0.012000  0.008000: inits 3
 0.003000   0.005000  0.002000: clipboard setup
 0.002600   0.004000  0.002000: editing files in windows

If you want to run with Neovim, please specify -vimpath option as follows:

$ vim-startuptime -vimpath nvim

If you want to give some options to underlying vim command executions, please specify them after -- argument in command line as follows:

$ vim-startuptime -- --cmd DoSomeCommand

Please see -help option to know the command options.

What's Next after running vim-startuptime?

By running vim-startuptime, now you know which script file takes time to run. What you should do next is :profile.

$ vim --cmd 'profile start profile.log' --cmd 'profile! file /path/to/slow_script.vim' -c quit

Profiled results are dumped to profile.log. Please check it. In log file, :set ft=vim would help you analyze the results. Please see :help profile for more details.

(Maybe) TODO

  • Add more metrics like median
  • Temporarily isolate CPU for running Vim if possible

License

Distributed under the MIT License.

Popular Vim Projects
Popular Command Line Projects
Popular Text Editors Categories
Related Searches

Get A Weekly Email With Trending Projects For These Categories
No Spam. Unsubscribe easily at any time.
Golang
Command Line
Vim
Metrics
Time
Neovim
Startup