Addendum:

In addition to not having ~/.vimrc and ~/.vim, I do not have a system
vimrc - no $VIMRUNTIME/vimrc and /etc/vimrc.  So, the options and
settings that were in effect were either Vim defaults, or the ones set
by $VIMRUNTIME/defaults.vim.

Operating system: Slackware GNU/Linux 14.2, x86_64

Thanks!

On Sat, Feb 23, 2019 at 3:38 PM Raghu Rao <[email protected]> wrote:
>
> Apologies for the incomplete subject line.  It should have been
> 'Incorrect indentation in shell scripts'.
>
> Thanks!
>
> On Sat, Feb 23, 2019 at 3:31 PM Raghu Rao <[email protected]> wrote:
> >
> > Hello Vim-Dev!
> >
> > It appears there is a bug in shell script indentation.
> >
> > Take the following shell script example:
> >
> > #!/bin/bash
> >
> > if true; then
> >     if :; then
> >         while false; do
> >             if :; then
> >                 :
> >             elif true; then
> >                 :
> >             else
> >                 :
> >             fi
> >         done
> >     fi
> > fi
> >
> > It should be indented as shown above.  Upon doing gg=G on the above in
> > Vim>8.1.871, it gets indented as follows:
> >
> > #!/bin/bash
> >
> > if true; then
> >     if :; then
> >         while false; do
> >             if :; then
> >                 :
> >             elif true; then
> >                 :
> >             else
> >                 :
> >             fi
> >         done
> >             fi
> >             fi
> >
> > The last two lines are indented incorrectly.
> >
> > I had neither ~/.vimrc nor ~/.vim when I found the problem described above.
> >
> > I have attached screenshots of the expected and actual indentations,
> > in case the leading spaces in this email are removed/modified during
> > transit.
> >
> > It appears that the bug was introduced in the following commit:
> >
> > https://github.com/vim/vim/commit/314dd79cac2adc10304212d1980d23ecf6782cfc
> >
> > Versions of Vim prior to this commit indent the above shell script
> > correctly.  Versions at or after the above commit do the indentation
> > incorrectly.
> >
> > Thank you!
> >
> > Raghu Rao

-- 
-- 
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/d/optout.

Raspunde prin e-mail lui