I am trying to build my own indent file for JavaScript. The default indent file for JavaScript turns cindent on, with minimal modifications, and I am using that as a base.
On Vim 7.3 for OSX El Capitan, typing an array produces the following by default:
var test = [
1,
2,
3
];
And note, while not legal JavaScript, I noticed not using a comma produces a slightly different behavior:
var test = [
1
2
3
];
On 7.4, typing the above two examples produces what I expect:
var test = [
1,
2,
3
];
var test = [
1
2
3
];
However, if you include some characters immediately following the open square bracket it goes back out of whack:
var test = [1
2,
3,
4
];
What controls the indentation of the lines between square brackets as well as the placement of the closing square bracket? When viewing the Vim documentation, I don't see a cinoptions value that captures this.