Noureddine RAMDI / vim-startuptime: interactive profiling of Vim and Neovim startup performance

Created Sat, 23 May 2026 20:41:14 +0000 Modified Sat, 23 May 2026 20:41:27 +0000

dstein64/vim-startuptime

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 :StartupTime command.
  • 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.1453 or nvim>=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 for nvim).
      • +startuptime is required.
      • +timers is recommended, to capture all startup events.
      • +terminal is 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
    • :PluginInstall or $ vim +PluginInstall +qall
  • [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
    • :PlugInstall or $ vim +PlugInstall +qall
  • [dein.vim][dein]:
    • Add call dein#add('dstein64/vim-startuptime') to ~/.vimrc
    • :call dein#install()
  • [NeoBundle][neobundle]:
    • Add NeoBundle 'dstein64/vim-startuptime' to ~/.vimrc
    • Re-open vim or execute :source ~/.vimrc

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.


→ GitHub Repo: dstein64/vim-startuptime ⭐ 662 · Vim Script