Closed KiLLeRRaT closed 1 year ago
This is standard indentation, see :help cino-(:
default 'shiftwidth' * 2
To have a "single" indent, use:
" ~/.vim/after/ftplugin/cs.vim
setlocal cinoptions=(1s
Hi @nickspoons , ah that's great and works~
Hmm there are quiet a few to iron out I think. I just stumbled upon another one:
return new LoginResponse
{
| Success = false,
| | | | Message = _frameworkSettings.InvalidLoginErrorMessage
};
Do people mostly just ignore all this and manually deal with these issues as they write code, or do people just avoid using gg=G
when working with C# files?
Thanks,
I don't know what other people do, I quite like the double-indent in an argument list that you originally described, it separates the declaration from the method content. That's a personal preference situation though.
The second one is handled with :help cino-J, so you'd include this like so:
" ~/.vim/after/ftplugin/cs.vim
setlocal cinoptions=(1s,J1
(1s
is subjective but J1
is possibly something that should be pre-set by the C# runtime files.
J1
is possibly something that should be pre-set by the C# runtime files.
I had a quick search through the vim runtime files and no other runtime files set cino=J1
(except for some tests) so I won't do it here either.
Note: We now set then J1
cinoptions
option.
Hi,
I'm having some issues with indents in C#.
Settings are:
When I use
gww
to format a long line of C#, this happens:Orig line:
Formatted line (pipes inserted where tab characters display for visibility):
It indents using two tabs, instead of a single tab.
Any thoughts on this?
Thanks,