-
-
Notifications
You must be signed in to change notification settings - Fork 102
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Indentation of esac
is off
#39
Comments
You will see the same issue without endwise if you try to create an empty case statement. Not a lot I can do about that. |
@tpope No, that's exactly what I'm saying: If I uninstall endwise, I don't get the same behavior. If endwise isn't present, the indentation is correct by default. Ah, now I see: the issue is an empty case statement. Duh, sorry. In that case, honestly, it seems better for vim-endwise not to do |
A comment from @telemachus I received by email earlier notes that Super Shell Indent was in use and that it fixed the |
@tangledhelix Yes and no. @tpope was right, and I was confused. If you create an empty
But that said, if I add Super Shell Indent, then everything works -- whether or not I have vim-endwise, including empty So I now understand that the real problem is in Vim's indentation file for shell. Having said that, unless that gets fixed, I wonder whether it isn't better to remove For what it's worth, a very small edit to the built-in shell indentation seems to fix things:
Unfortunately, I'm a complete rookie at Vimscript, so I'm not sure how much to trust this. Essentially though, I'm just testing for an "empty case" by checking if the previous line is |
With
vim-endwise
installed, the indentation ofcase...esac
structures in shell scripts is off.The result is something like this:
An earlier comment suggests that this is a known problem. However, @tangledhelix seems to say there that the problem occurs with or without vim-endwise. That's not the case, I don't think. I only have this problem with vim-endwise installed.
The text was updated successfully, but these errors were encountered: