[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Official bash vim indentation file
From: |
Jesse Hathaway |
Subject: |
Re: Official bash vim indentation file |
Date: |
Sun, 8 Mar 2020 15:49:10 -0500 |
On Sat, Mar 7, 2020 at 6:38 PM Peng Yu <address@hidden> wrote:
> I can not find a vim indentation file that can support 100% bash
> syntax. The best that I can find is the following one, which is still
> not implemented in a way that support 100% of bash syntax (probably
> due to limitation in vim?) as I had found bugs (usually occur when
> multiple bash language constructs nested together) in it several
> times.
>
> https://github.com/Clavelito/indent-sh.vim
>
> Is there something that can support indentation for 100% of bash
> syntax in vim? Thanks.
Have you tried shfmt?[1] In my experience it does an excellent job automatically
indenting bash code.
[1]: https://github.com/mvdan/sh#shfmt