Skip to content

Skip BufRead for an unnamed empty buffer - #1341

Merged
junegunn merged 1 commit into
junegunn:masterfrom
mattn:skip-bufread-empty-buffer
Oct 15, 2026
Merged

junegunn merged 1 commit into
junegunn:masterfrom
mattn:skip-bufread-empty-buffer

Conversation

@mattn

@mattn mattn commented Oct 15, 2026

Copy link
Copy Markdown
Contributor

Loading a plugin on demand triggers BufRead to apply its ftdetect and ftplugin files, but there is nothing to detect in an unnamed empty buffer such as the one Vim creates on startup. On my Windows setup this reduces median startup time from 390 ms to 368 ms (20 runs each).

Loading a plugin on demand triggers BufRead to apply ftdetect and ftplugin files, but there is nothing to detect in an unnamed empty buffer such as the one Vim creates on startup.

Signed-off-by: Yasuhiro Matsumoto <mattn.jp@gmail.com>
@junegunn
junegunn merged commit 7e5aae5 into junegunn:master Oct 15, 2026
1 check passed
@junegunn

Copy link
Copy Markdown
Owner

Thank you!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants