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
--
--
You received this message from the "vim_dev" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php
---
You received this message because you are subscribed to the Google Groups
"vim_dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
For more options, visit https://groups.google.com/groups/opt_out.
79a80,81
> elseif line =~ '^\s*esac\>' && s:is_case_empty(getline(v:lnum - 1))
> let ind -= s:indent_value('default')
156a159,166
> function! s:is_case_empty(line)
> if a:line =~ '^\s*$'
> return s:is_case_empty(getline(v:lnum - 1))
> else
> return a:line =~ '^\s*case\>'
> endif
> endfunction
>