# 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 with the same engine and analysis options on the dates shown in the methodology line: files, total lines, code lines, comment lines, blank lines, and per-language totals, pinned to the exact commits listed below.

As of 2026-09-16, emacs-mirror/emacs contains 2,925,681 total lines (2,049,608 code) across 2,705 files, while vim/vim contains 1,959,337 total lines (1,313,276 code) across 3,604 files as of 2026-09-14. emacs-mirror/emacs is about 1.6x the size of vim/vim by code lines. Code size is not code quality: a larger count only means more source material, not a better or worse project.

| Metric | [emacs-mirror/emacs](https://octocounts.com/github/emacs-mirror/emacs) | [vim/vim](https://octocounts.com/github/vim/vim) |
| --- | ---: | ---: |
| Files | 2,705 | 3,604 |
| Total lines | 2,925,681 | 1,959,337 |
| Code lines | 2,049,608 | 1,313,276 |
| Comment lines | 585,558 | 399,309 |
| Blank lines | 290,515 | 246,752 |
| Languages counted | 12 | 12 |

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.3% of code), C (33.7% of code), PO File (17.9% 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 82f763756c71aae1f6361c7ae116a31887f8cc8d (commit 82f763756c71) on 2026-09-16; vim/vim was counted at ref master (commit 6e67c47e6edd) on 2026-09-14. See the [counting methodology](https://octocounts.com/docs/methodology) for ignored directories and analysis options.
## About this comparison

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 counts the Vim repository: the C editor core with its Vimscript runtime files and documentation. Both counts are text-editor source trees, but Emacs' tree carries a much larger Lisp library.

The per-language tables show each editor's architecture directly: Emacs' counted tree pairs a C core with a very large Emacs Lisp layer, while Vim's is predominantly C with its runtime files in Vimscript and documentation formats.

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)](https://github.com/emacs-mirror/emacs) · [vim/vim repository](https://github.com/vim/vim). Statements verified 2026-09-16.

Evidence and next steps:

- [emacs-mirror/emacs SLOC report](https://octocounts.com/github/emacs-mirror/emacs)
- [vim/vim SLOC report](https://octocounts.com/github/vim/vim)
- [Compare emacs-mirror/emacs and vim/vim interactively](https://octocounts.com/compare?left=https%3A%2F%2Fgithub.com%2Femacs-mirror%2Femacs&right=https%3A%2F%2Fgithub.com%2Fvim%2Fvim)

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?

emacs-mirror/emacs has more code: 2,049,608 code lines versus 1,313,276 for vim/vim, about 1.6x as much, based on cached OctoCounts reports as of 2026-09-16.

### 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 82f763756c71aae1f6361c7ae116a31887f8cc8d (commit 82f763756c71) on 2026-09-16; vim/vim was counted at ref master (commit 6e67c47e6edd) on 2026-09-14. 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.

## Related OctoCounts pages

- [Interactive repository comparison](https://octocounts.com/compare)
- [Recently analyzed repositories](https://octocounts.com/recent)
- [Popular SLOC reports](https://octocounts.com/popular)
- [Trending GitHub repositories](https://octocounts.com/trending)
- [Hall of Monoliths](https://octocounts.com/hall-of-monoliths)
- [Original research: how filtering changes SLOC counts](https://octocounts.com/research)
- [GitHub SLOC counter guide](https://octocounts.com/docs/github-sloc-counter)
- [Counting methodology](https://octocounts.com/docs/methodology)
- [SLOC and code metrics glossary](https://octocounts.com/docs/glossary)
- [OctoCounts API docs](https://octocounts.com/docs/api)
