Are you happy with your logging solution? Would you help us out by taking a 30-second survey? Click here

vim-endwise

endwise.vim: wisely add "end" in ruby, endfunction/endif/more in vim script, etc

Subscribe to updates I use vim-endwise


Statistics on vim-endwise

Number of watchers on Github 648
Number of open issues 23
Average time to close an issue 3 months
Main language VimL
Average time to merge a PR 16 days
Open pull requests 7+
Closed pull requests 10+
Last commit over 2 years ago
Repo Created almost 10 years ago
Repo Last Updated over 1 year ago
Size 58 KB
Homepage http://www.vim.or...
Organization / Authortpope
Contributors21
Page Updated
Do you use vim-endwise? Leave a review!
View open issues (23)
View vim-endwise activity
View on github
Fresh, new opensource launches πŸš€πŸš€πŸš€
Trendy new open source projects in your inbox! View examples

Subscribe to our mailing list

Evaluating vim-endwise for your project? Score Explanation
Commits Score (?)
Issues & PR Score (?)

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, VB (don't ask), C/C++ preprocessor, and Lua 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

If you don't have a preferred installation method, I recommend installing pathogen.vim, and then simply copy and paste:

cd ~/.vim/bundle
git clone git://github.com/tpope/vim-endwise.git

Self-Promotion

Like endwise.vim? Follow the repository on GitHub and vote for it on vim.org. And if you're feeling especially charitable, follow tpope on Twitter and GitHub.

License

Copyright (c) Tim Pope. Distributed under the same terms as Vim itself. See :help license.

vim-endwise open issues Ask a question     (View All Issues)
  • almost 3 years make two spaces for indentation not a tab.
  • about 3 years Elixir support does not work for functions
  • about 3 years Support """
  • over 3 years LaTex
  • almost 4 years [Feature] Add class/module/method names after 'end' keyword
  • about 5 years Request: support for ERB
  • over 5 years Request for Vim’s β€˜augroup’
  • almost 6 years Closing latex environments
  • almost 6 years Remove ending if entered manually
  • about 6 years After hit <CR>, endwise repeat the function name in the end, why?
  • about 6 years <CR> in Insert-mode breaks up changes
  • about 7 years Enter conflicts with neocomplcache
  • over 8 years Incompatibility with autocomplpop / does not handle pumvisible()
  • over 8 years Request for javascript? :D
  • over 8 years Hitting enter inserts "<Plug>DiscretionaryEnd"
vim-endwise open pull requests (View All Pulls)
  • support the Julia language
  • Improve setup of mappings
  • Add SQL initial support
  • Add support for blade
  • Make mappings silent.
  • Support CMake scripts
  • Adjust elixir addition to handle anonymous functions
vim-endwise list of languages used
  • Vim script
Other projects in VimL