Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
// test case for https://vi.stackexchange.com/questions/8718/vim-switch-statement-cindent-options/8722#8722
{
switch (status)
{
case Status.OK:
return ErrorCode.OK;
case Status.Bad:
{
Log(status);
return ErrorCode.FAIL;
}
case Status.Fatal:
{
Abort(status);
return ErrorCode.FAIL;
}
}
}
@idbrii

This comment has been minimized.

Copy link
Owner Author

idbrii commented Sep 5, 2018

Using :let v:lnum = getcurpos()[1] | ec GetCaseBlockCorrectedIndent() .' '. cindent(v:lnum) on each line, I can see that cindent seems to be giving the same indent as the first brace.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.