Emacs vs Vim: source lines of code compared

The Emacs vs Vim comparison on OctoCounts shows side-by-side source line counts for emacs-mirror/emacs and vim/vim, counted under the rules and on the dates stated below: files, total lines, code lines, comment lines, blank lines, and per-language totals, pinned to the exact commits listed below.

This page compares the source lines of code (SLOC) of emacs-mirror/emacs and vim/vim using cached OctoCounts reports. Code size is not code quality: a larger count only means more source material, not a better or worse project.

As of 2026-11-16, emacs-mirror/emacs contains 2,930,942 total lines (2,052,694 code) across 2,709 files, while vim/vim contains 1,711,244 total lines (1,334,803 code) across 3,468 files as of 2026-11-15. emacs-mirror/emacs has about 1.5x the counted code lines of vim/vim under the same engine and counting rules. Code size is not code quality: a larger count only means more source material, not a better or worse project.

Metricemacs-mirror/emacsvim/vim
Files2,7093,468
Total lines2,930,9421,711,244
Code lines2,052,6941,334,803
Comment lines587,762176,479
Blank lines290,486199,962
Languages counted3046

Top languages in emacs-mirror/emacs: Emacs Lisp (64.3% of code), C (20.1% of code), Lex (8.6% of code). Top languages in vim/vim: Vim Script (42.6% of code), C (33.4% of code), PO File (18.1% of code). C, C Header appear in both top language lists; Emacs Lisp, Lex, Objective-C appear only in emacs-mirror/emacs's top languages; Vim Script, PO File, Makefile appear only in vim/vim's top languages.

Methodology: both counts come from cached OctoCounts reports generated with tokei. emacs-mirror/emacs was counted at ref master (commit e93f406bef02) on 2026-11-16; vim/vim was counted at ref master (commit 6b8b82ff5c5d) on 2026-11-15. See the counting methodology for ignored directories and analysis options.

Both reports use the same engine and effective counting rules. Repository declarations, when enabled, are specific to each repository. emacs-mirror/emacs: tokei-15.0.0, policy directories-v1; docs excluded, tests excluded, generated excluded. Excluded directory names: .cache, .generated, .git, .next, __tests__, build, dist, doc, docs, documentation, fixtures, gen, generated, node_modules, target, test, tests, vendor. Ignored languages: none. Repository declarations: off. Exclusions are rule-based; they do not prove that every test, document or generated file was removed. vim/vim: tokei-15.0.0, policy directories-v1; docs excluded, tests excluded, generated excluded. Excluded directory names: .cache, .generated, .git, .next, __tests__, build, dist, doc, docs, documentation, fixtures, gen, generated, node_modules, target, test, tests, vendor. Ignored languages: none. Repository declarations: off. Exclusions are rule-based; they do not prove that every test, document or generated file was removed.

About this comparison

Background observations recorded on 2026-09-16; language descriptions here are historical context, not claims about the current filtered shares. Use this page's measured language breakdown for current counts. Repository layout before counting filters: emacs-mirror/emacs is a GitHub mirror of the Emacs source tree: the C runtime core plus the large Emacs Lisp library — bundled modes, packages, and documentation — that makes up most of what users experience. vim/vim is the Vim repository: the C editor core with its Vimscript runtime files and documentation. Both repositories are text-editor source trees, but Emacs' tree carries a much larger Lisp library.

A substantial share of Emacs' count is Lisp code that ships to users as the editor's bundled functionality — modes and libraries — so its total measures a core plus an ecosystem shipped in one tree.

The totals do not compare which editor does more: Emacs ships more of its extension library inside its own repository by design, while Vim's ecosystem lives largely in external plugins — a packaging difference the counts cannot bridge.

Sources: emacs-mirror/emacs (mirror of the Emacs source tree) · vim/vim repository. Statements verified 2026-09-16.

Evidence and next steps:

Saved reports remain subject to cache cleanup and replacement. Export their JSON for durable citation; live report URLs can change.

Note: code size is not code quality. OctoCounts only reports reproducible line counts and makes no claim that either project is better.

Compare FAQ

Which has more lines of code, emacs-mirror/emacs or vim/vim?

As of 2026-11-16, emacs-mirror/emacs contains 2,930,942 total lines (2,052,694 code) across 2,709 files, while vim/vim contains 1,711,244 total lines (1,334,803 code) across 3,468 files as of 2026-11-15. emacs-mirror/emacs has about 1.5x the counted code lines of vim/vim under the same engine and counting rules. Code size is not code quality: a larger count only means more source material, not a better or worse project.

Does more source lines of code mean more complexity?

Not necessarily. SLOC measures size, not complexity, quality, or maintainability. A larger codebase can mean more features, more generated or vendored code, more verbose language idioms, or more tests — none of which imply the code is harder to work with. Use SLOC to gauge the scale of what you'd be reading or maintaining, not as a quality signal for emacs-mirror/emacs, vim/vim, or any repository.

How is this comparison calculated?

Methodology: both counts come from cached OctoCounts reports generated with tokei. emacs-mirror/emacs was counted at ref master (commit e93f406bef02) on 2026-11-16; vim/vim was counted at ref master (commit 6b8b82ff5c5d) on 2026-11-15. See the counting methodology for ignored directories and analysis options.

Can I compare a different branch, tag, or commit?

Yes. This page shows the default branch for each repository. Use the interactive comparison tool to pick any public GitHub repository, branch, tag, or commit SHA for both sides and get a fresh side-by-side report.