From 635558342ee61d1fd037d78340f4d4db6c399355 Mon Sep 17 00:00:00 2001 From: "R. Steve McKown" Date: Wed, 9 Sep 2015 17:59:33 -0600 Subject: [PATCH] vim/vimrc: indenting structure initializers Use the java cinoptions to get better behavior for initializers of structures when using named member initialization. Note that these options cause some C code to be indented incorrectly, for example: if (func1(arg, arg) == value) { do_something(); } becomes: if (func1(arg, arg) == value) { do_something(); } --- vim/vimrc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/vim/vimrc b/vim/vimrc index 57fd1d8..c6fce6b 100644 --- a/vim/vimrc +++ b/vim/vimrc @@ -71,7 +71,7 @@ set list set softtabstop=2 shiftwidth=2 expandtab " cinoptions for code formatting -set cinoptions=t0,us,U1,k2s +set cinoptions=t0,us,U1,k2s,j1,J1 " File type specific settings. if has("autocmd") -- 2.39.2