Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/tpope/vim-endwise
endwise.vim: Wisely add
https://github.com/tpope/vim-endwise
Last synced: 30 days ago
JSON representation
endwise.vim: Wisely add
- Host: GitHub
- URL: https://github.com/tpope/vim-endwise
- Owner: tpope
- Created: 2009-12-13T19:36:34.000Z (almost 15 years ago)
- Default Branch: master
- Last Pushed: 2024-01-16T04:34:09.000Z (10 months ago)
- Last Synced: 2024-05-01T23:13:54.286Z (7 months ago)
- Language: Vim Script
- Homepage: https://www.vim.org/scripts/script.php?script_id=2386
- Size: 77.1 KB
- Stars: 1,091
- Watchers: 17
- Forks: 103
- Open Issues: 21
-
Metadata Files:
- Readme: README.markdown
- Contributing: CONTRIBUTING.markdown
- Funding: .github/FUNDING.yml
Awesome Lists containing this project
README
# endwise.vim
This is a simple plugin that helps to end certain structures
automatically. In Ruby, this means adding `end` after `if`, `do`, `def`
and several other keywords. In Vimscript, this amounts to appropriately
adding `endfunction`, `endif`, etc. There's also Bourne shell, Z shell,
VB (don't ask), C/C++ preprocessor, Lua, Elixir, Haskell, Objective-C,
Matlab, Crystal, Make, Verilog and Jinja templates support.A primary guiding principle in designing this plugin was that an
erroneous insertion is never acceptable. The behavior is only triggered
once pressing enter on the end of the line. When this happens, endwise
searches for a matching end structure and only adds one if none is
found.While the goal was to make it customizable, this turned out to be a tall
order. Every language has vastly different requirements. Nonetheless,
for those bold enough to attempt it, you can follow the model of the
autocmds in the plugin to set the three magic variables governing
endwise's behavior.## Installation
Install using your favorite package manager, or use Vim's built-in package
support:mkdir -p ~/.vim/pack/tpope/start
cd ~/.vim/pack/tpope/start
git clone https://tpope.io/vim/endwise.git## Self-Promotion
Like endwise.vim? Follow the repository on
[GitHub](https://github.com/tpope/vim-endwise) and vote for it on
[vim.org](http://www.vim.org/scripts/script.php?script_id=2386). And if
you're feeling especially charitable, follow [tpope](http://tpo.pe/) on
[Twitter](http://twitter.com/tpope) and
[GitHub](https://github.com/tpope).## License
Copyright (c) Tim Pope. Distributed under the same terms as Vim itself.
See `:help license`.