Result of auto-indent in vim (filetype indent on)
main() {
case $1 in
--ssh)
echo "sshing into ${aws_ips[$1]}"
ssh -i VPN_NODE_1.pem ${aws_ips[$1]}
;;
--scp)
echo "scping $2 from ${aws_ips[$1]} to $3"
scp -r -i VPN_NODE_1.pem ${aws_ips[$1]}:$2 $3
;;
esac
}
Expected:
main()
{
case $1 in
--ssh)
echo "sshing into ${aws_ips[$1]}"
ssh -i VPN_NODE_1.pem ${aws_ips[$1]}
;;
--scp)
echo "scping $2 from ${aws_ips[$1]} to $3"
scp -r -i VPN_NODE_1.pem ${aws_ips[$1]}:$2 $3
;;
esac
}
EDIT: My original post was incorrect. I was not using filetype indent on in my .vimrc, I was using it in the vim command prompt
:set ft? autoindent? cindent? indentexpr?
show? – B Layer Oct 20 '18 at 12:12