From 0d23b6e515a01a5782532351821ebfa11f3d6cf2 Mon Sep 17 00:00:00 2001 From: Ben Beltran Date: Mon, 8 Oct 2012 11:44:10 -0500 Subject: Add vim again :) --- vim/plugin/endwise.vim | 134 +++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 134 insertions(+) create mode 100644 vim/plugin/endwise.vim (limited to 'vim/plugin/endwise.vim') diff --git a/vim/plugin/endwise.vim b/vim/plugin/endwise.vim new file mode 100644 index 0000000..dca90ff --- /dev/null +++ b/vim/plugin/endwise.vim @@ -0,0 +1,134 @@ +" endwise.vim - EndWise +" Author: Tim Pope +" Version: 1.0 +" License: Same as Vim itself. See :help license +" GetLatestVimScripts: 2386 1 :AutoInstall: endwise.vim + +if exists("g:loaded_endwise") || &cp + finish +endif +let g:loaded_endwise = 1 + +augroup endwise " {{{1 + autocmd! + autocmd FileType lua + \ let b:endwise_addition = '\=submatch(0)=="{" ? "}" : "end"' | + \ let b:endwise_words = 'function,do,then' | + \ let b:endwise_pattern = '^\s*\zs\%(function\|do\|then\)\>\%(.*[^.:@$]\\)\@!\|\DiscretionaryEnd") == "" + inoremap DiscretionaryEnd =crend(0) + inoremap AlwaysEnd =crend(1) + imap