kakoune/rc
Simon Fowler 04005b06b0 Add support for basic auto-indenting of sh code.
This attempts to support a simple formatting and intentation style for
plain sh syntax (and other sh-compatible code which doesn't stray too
far from portable sh).

The complexity of sh syntax means that we have to be opinionated -
attempting to be more flexible would require extensive context
awareness, and would require something more akin to a proper
autoformatting tool or a language server.

The formatting style used here makes use of vertical whitespace as the
primary delimiter, so that code ends up looking like this:

if [ $foo = "bar" ]; then
        thing1
else
        thing2
fi

for i in foo bar baz; do
        thing1
        thing2
done

case "$foo" in
        bar) thing1;;
        baz)
                thing1
                thing2
                ;;
esac

Since the formatting style used is very opinionated the 'sh_auto_indent'
option can be used to disable auto-indentation, with the default set to
'no'.
2019-06-20 13:19:15 +10:00
..
detection max_line_length support for editorconfig 2019-06-13 00:03:45 +02:00
filetype Add support for basic auto-indenting of sh code. 2019-06-20 13:19:15 +10:00
tools Merge branch 'master' of http://github.com/codesoap/kakoune 2019-06-19 23:01:11 +10:00
windowing Add st (simple terminal) to the known terminals 2019-06-07 21:46:20 +02:00