Improper indentation for empty case statements in shell scripts

29 views
Skip to first unread message

Peter Aronoff

unread,
Sep 11, 2013, 5:28:11 PM9/11/13
to vim...@vim.org
Steps to reproduce:

1. Type an empty case statement.
2. Result:

case
esac

I was able to fix this with a relatively simple change to indent/sh.vim (see
attached), but I'm very inexperienced with Vimscript. Still I'm happy to
help if possible, and I wanted to see whether anyone else had a better
suggestion.

Thanks, Peter
--
We have not been faced with the need to satisfy someone else's
requirements, and for this freedom we are grateful.
Dennis Ritchie and Ken Thompson, The UNIX Time-Sharing System
sh.vim.patch

Peter Aronoff

unread,
Sep 12, 2013, 8:45:48 AM9/12/13
to vim...@vim.org
On Wed Sep 09/11/13 at 5:28, Peter Aronoff wrote:
> I was able to fix this with a relatively simple change to indent/sh.vim
> (see attached), but I'm very inexperienced with Vimscript. Still I'm
> happy to help if possible, and I wanted to see whether anyone else had
> a better suggestion.

I'm attaching a slightly improved patch. As before, suggestions or
criticisms very welcome.
sh.vim-patch
Reply all
Reply to author
Forward
0 new messages