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.

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,168
> function! s:is_case_empty(line)
>     " Check if the line at hand is blank or a comment.
>     " If it is, try again with the line before that.
>     if a:line =~ '^\s*$' || a:line =~ '^\s*#'
>         return s:is_case_empty(getline(v:lnum - 1))
>     else
>         return a:line =~ '^\s*case\>'
>     endif
> endfunction
> 

Raspunde prin e-mail lui