# tpope/vim-sleuth

sleuth.vim: Heuristically set buffer options

Repository: https://github.com/tpope/vim-sleuth
Canonical: https://ross.abutalabs.com/products/vim-sleuth
Homepage: https://www.vim.org/scripts/script.php?script_id=4375
Language: Vim Script
License Family: other
Last push: 2024-09-19T04:01:53+00:00

## Health v2 (maintenance only)
Score: 32/100 (v2, computed 2026-09-03T02:20:16.233290+00:00)
- activity 0, release rhythm 35, longevity 100
- inputs: {"age_days": 4994, "days_push": 713, "days_rel": null, "gap_med": null, "n_releases_24m": 0}
- flags: no_releases, no_license
- formula: round(0.45*activity + 0.35*rhythm + 0.20*longevity); archived -> min(score, 10)

## Adoption (not part of the score)
Stars 2145, forks 94 (observed 2026-08-28T04:06:18.706860+00:00)

## What it is
sleuth.vim is a Vim plugin that heuristically detects indentation settings from the current file and neighboring files, automatically setting 'shiftwidth' and 'expandtab'. It also consults modelines and EditorConfig files to set additional buffer options like 'tabstop' and 'textwidth'.

## Use cases
- automatically detect indentation style in vim
- stop manually setting shiftwidth and expandtab per project
- respect editorconfig indentation settings in vim
- detect tabs vs spaces when opening a file
- remove indent-related configuration from my vimrc
- set buffer options from modelines automatically

## When to choose
- you use Vim or Neovim and want fully automatic indentation detection
- you work across projects with inconsistent indentation conventions
- you want EditorConfig support without a separate plugin

## When to avoid
- you prefer explicit, fixed indentation settings in your vimrc
- you use an editor other than Vim/Neovim
- you need indentation detection for non-editor tooling

## Facets
- artifact type: plugin
- maturity: stable
- function: editor, developer-tools
- domain: text-editors, developer-tools
- platform: editor-plugin, cross-platform
- tags: vim, editorconfig, indentation, shiftwidth, expandtab, heuristics

## Member repositories
- tpope/vim-sleuth (main) score 32

## Provenance
- Observed fields: from GitHub, fetched 2026-08-28T04:06:18.706860+00:00.
- Health v2: computed from the inputs above; adoption is never an input.
- Inferred fields (summary, facets, guidance): AI-extracted, prompt v1, taxonomy v1, on 2026-08-30T02:51:12.908763+00:00, confidence not recorded.
  - readme: https://github.com/tpope/vim-sleuth (fetched 2026-08-28T04:06:18.706860+00:00, sha c54f87563484)
  - homepage: https://www.vim.org/scripts/script.php?script_id=4375 (fetched 2026-08-29T10:31:13.159729+00:00, sha 628e7be01ead)
  - site_page: https://www.vim.org/about.php (fetched 2026-08-29T10:31:13.162337+00:00, sha 1bd2c1907ce5)
  - site_page: https://www.vim.org/docs.php (fetched 2026-08-29T10:31:13.164260+00:00, sha 438015e9e2e2)
  - site_page: http://www.vim.org/about.php (fetched 2026-08-29T10:31:13.166012+00:00, sha fbe78bde9535)
- Data as of 2026-08-30T08:39:29.467469+00:00.
