# tpope/vim-endwise

endwise.vim: Wisely add

Repository: https://github.com/tpope/vim-endwise
Canonical: https://ross.abutalabs.com/products/vim-endwise
Homepage: https://www.vim.org/scripts/script.php?script_id=2386
Language: Vim Script
License Family: other
Last push: 2025-11-05T03:09:00+00:00

## Health v2 (maintenance only)
Score: 55/100 (v2, computed 2026-09-03T02:20:16.233290+00:00)
- activity 50, release rhythm 35, longevity 100
- inputs: {"age_days": 6107, "days_push": 301, "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 1167, forks 102 (observed 2026-08-28T04:03:50.744752+00:00)

## What it is
endwise.vim is a Vim plugin that automatically adds matching end structures when you press Enter, such as adding `end` after Ruby `if`/`def`/`do` blocks or `endif`/`endfunction` in Vimscript. It supports many languages including Ruby, Vimscript, shell, Lua, Elixir, Haskell, Matlab, Crystal, Verilog, and Jinja templates, and never inserts an end keyword if one already exists.

## Use cases
- automatically add end after if def do in ruby
- auto-close blocks in vim when pressing enter
- add endif and endfunction automatically in vimscript
- vim plugin to complete lua and elixir block endings
- stop forgetting to close blocks in vim
- auto-insert matching end keywords for multiple languages in vim

## When to choose
- you write Ruby, Vimscript, Lua, Elixir, or other supported languages in Vim and want block ends inserted automatically
- you want a lightweight, conservative plugin that never inserts an erroneous end keyword
- you use Vim's native package support or any plugin manager

## When to avoid
- you use Neovim with Lua-based alternatives like nvim-autopairs that cover this behavior
- your language is not among the supported filetypes and you don't want to write custom autocmd configuration
- you want full IDE-style auto-indentation and snippet expansion rather than just end insertion

## Facets
- artifact type: plugin
- maturity: stable
- function: editor, developer-tools
- domain: text-editors, developer-tools
- platform: editor-plugin, cli
- tags: vim, vim-plugin, code-completion, block-end-insertion

## Member repositories
- tpope/vim-endwise (main) score 55

## Provenance
- Observed fields: from GitHub, fetched 2026-08-28T04:03:50.744752+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-30T06:28:53.898163+00:00, confidence not recorded.
  - readme: https://github.com/tpope/vim-endwise (fetched 2026-08-28T04:03:50.744752+00:00, sha b7227163d9f3)
  - homepage: https://www.vim.org/scripts/script.php?script_id=2386 (fetched 2026-08-29T12:35:02.444005+00:00, sha 1c28373906d7)
  - site_page: https://www.vim.org/about.php (fetched 2026-08-29T12:35:02.454066+00:00, sha 1bd2c1907ce5)
  - site_page: https://www.vim.org/docs.php (fetched 2026-08-29T12:35:02.456260+00:00, sha 438015e9e2e2)
  - site_page: http://www.vim.org/about.php (fetched 2026-08-29T12:35:02.458370+00:00, sha fbe78bde9535)
- Data as of 2026-08-30T08:39:29.467469+00:00.
