Skip to content

Commit

Permalink
Merge pull request #69 from nickspoons/cino-J
Browse files Browse the repository at this point in the history
setlocal cinoptions=J1
  • Loading branch information
nickspoons authored Aug 28, 2024
2 parents ac933c3 + 5f3294c commit e12bbee
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 0 deletions.
2 changes: 2 additions & 0 deletions ftplugin/cs.vim
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,8 @@ setlocal formatoptions-=t formatoptions+=croql
" Set 'comments' to format dashed lists in comments.
setlocal comments=sO:*\ -,mO:*\ \ ,exO:*/,s1:/*,mb:*,ex:*/,:///,://

setlocal cinoptions=J1

let b:undo_ftplugin = 'setl com< fo<'

if exists('loaded_matchit') && !exists('b:match_words')
Expand Down
17 changes: 17 additions & 0 deletions test/indent.vader
Original file line number Diff line number Diff line change
Expand Up @@ -74,3 +74,20 @@ Expect cs(correct indentation):
string m_PrettyName = "";
}
}

Given cs (an object initialization with more than one property):
return new LoginResponse
{
Success = false,
Message = _frameworkSettings.InvalidLoginErrorMessage
};

Execute:
normal! gg=G

Expect cs(correct indentation):
return new LoginResponse
{
Success = false,
Message = _frameworkSettings.InvalidLoginErrorMessage
};

0 comments on commit e12bbee

Please sign in to comment.