vim-startuptime is a plugin that brings clarity to the often opaque process of Vim and Neovim startup. By programmatically invoking a fresh editor instance with the --startuptime flag, it parses the raw timing output into a navigable and interactive buffer. This means you can see individual event timings down to the millisecond, explore sourcing events in detail, and understand where your config or plugins might be slowing down startup.
what vim-startuptime does and its architecture
This plugin is built entirely in Vim script and supports both Vim (version 8.0.1453 or later) and Neovim (0.3.1 or later). It depends on Vim being compiled with the +startuptime and +terminal features, with +timers recommended to capture all delayed events fired after the initial screen draw, which normal --startuptime logging misses.
Under the hood, vim-startuptime spawns a new Vim/Neovim process with the --startuptime flag enabled, capturing a detailed log of startup events. Instead of leaving you with a plain log file, the plugin parses this text output and renders it into an interactive buffer inside your editor. Here, each event is listed with the time it took to complete in milliseconds.
Key functionality includes:
- Launching startup profiling via the
:StartupTimecommand. - Displaying detailed timing information for each event.
- Navigating into sourcing events with
gf(go to file), helping you jump straight to scripts impacting startup. - Showing additional event details via
K.
The plugin supports all major Vim package managers, making integration into existing setups straightforward.
technical strengths and design tradeoffs
What distinguishes vim-startuptime is how it “dogfoods” the Vim --startuptime flag by fully automating a fresh instance spawn and log parsing cycle. This ensures you profile your real config with all plugins and scripts loaded, not a sanitized or partial environment.
A clever aspect is the recommendation to use Vim compiled with +timers. The vanilla --startuptime output does not capture events triggered by timers that run after the initial UI draw, an important blind spot since many plugins delay some setup until after startup. By leveraging +timers, vim-startuptime can capture these late events, giving a more complete picture of startup costs.
The code is surprisingly clean and focused, written purely in Vim script without external dependencies, which helps in portability and maintenance. It relies on standard Vim features rather than complex native extensions or external binaries.
The tradeoff here is that the plugin requires specific Vim compile-time features which are not always present, especially in older versions or minimal builds. Also, while the plugin surfaces a lot of timing info, interpreting this data well still requires some Vim expertise — the tool surfaces data but doesn’t give automatic optimization suggestions.
quick start
Requirements
vim>=8.0.1453ornvim>=0.3.1- The plugin may work on earlier versions, but has not been tested.
- The plugin depends on compile-time features for
vim(not applicable fornvim).+startuptimeis required.+timersis recommended, to capture all startup events.+terminalis required.
Installation
A package manager can be used to install vim-startuptime.
Examples
- [Vim8 packages][vim8pack]:
git clone https://github.com/dstein64/vim-startuptime ~/.vim/pack/plugins/start/vim-startuptime
- [Vundle][vundle]:
- Add
Plugin 'dstein64/vim-startuptime'to~/.vimrc :PluginInstallor$ vim +PluginInstall +qall
- Add
- [Pathogen][pathogen]:
git clone --depth=1 https://github.com/dstein64/vim-startuptime ~/.vim/bundle/vim-startuptime
- [vim-plug][vimplug]:
- Add
Plug 'dstein64/vim-startuptime'to~/.vimrc :PlugInstallor$ vim +PlugInstall +qall
- Add
- [dein.vim][dein]:
- Add
call dein#add('dstein64/vim-startuptime')to~/.vimrc :call dein#install()
- Add
- [NeoBundle][neobundle]:
- Add
NeoBundle 'dstein64/vim-startuptime'to~/.vimrc - Re-open vim or execute
:source ~/.vimrc
- Add
Once installed, invoke :StartupTime within Vim or Neovim to generate and inspect the startup timing report.
verdict
vim-startuptime is a practical tool for Vim and Neovim users who want to get a granular understanding of their editor’s startup performance. It’s especially useful when managing complex configurations with many plugins where startup time can become sluggish.
The plugin’s approach of spawning a fresh instance to profile the real startup process is a solid design choice that leads to accurate results. The interactive buffer for navigating timing events makes the analysis more accessible than raw log files.
The main limitation is the dependency on Vim’s compile-time features which can be a hurdle on some platforms or distributions with minimal Vim builds. Also, while it surfaces comprehensive data, the user still needs to interpret the results and decide on optimization strategies.
Overall, vim-startuptime is a focused, reliable tool worth integrating into your Vim/Neovim toolkit if you care about startup speed and want direct insight into what slows you down.
Related Articles
- Uptime Kuma: A modern self-hosted uptime monitor with real-time reactive UI — Uptime Kuma is a self-hosted monitoring tool with a Vue 3 reactive UI and WebSocket-powered real-time updates. Supports
- pve-microvm: hardware-isolated microVMs integrated into Proxmox VE for fast, container-like boot times — pve-microvm patches Proxmox VE to expose QEMU microvm machine type for hardware-isolated VMs with container-like boot ti
- cord.nvim: hybrid Lua+Rust Discord Rich Presence for Neovim — cord.nvim integrates Discord Rich Presence with Neovim using a hybrid Lua and Rust architecture, shipping precompiled Ru
- Neovide: A Rust-based GPU-accelerated GUI front end for Neovim — Neovide is a Rust GUI client for Neovim, delivering smooth GPU-accelerated rendering by acting as a thin RPC client over
- VAM Seek: client-side 2D video timeline navigation with temporal RGB encoding — VAM Seek replaces 1D video scrubbing with a client-side 2D thumbnail grid using Canvas API and an LRU cache. It features
→ GitHub Repo: dstein64/vim-startuptime ⭐ 662 · Vim Script