Skip to content

Instantly share code, notes, and snippets.

@idbrii
Created September 5, 2018 18:50
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save idbrii/ef44340d4f955f0a7af4656618e7ed92 to your computer and use it in GitHub Desktop.
Save idbrii/ef44340d4f955f0a7af4656618e7ed92 to your computer and use it in GitHub Desktop.
// 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
Copy link
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