FooSoft/vim-argwrap

Feature Request: List starts on same line

ns-bak opened this issue · 3 comments

Having an option to make lists start on the same line would be convenient. eg:

void foo(Bar none, Bar one, Bar two);
// becomes
void foo(Bar none,
         Bar one,
         Bar two);

If this already exists then I apologize for not seeing it. Cheers and thanks.

+1

This would be a super awesome feature to have

I've forked this repository and started working on the implementation, the code can be found here. There are some caveats though:

  1. It assumes the indentation is spaces, not tabs (can be fixed quite easily).
  2. This option is added by setting let g:argwrap_wrap_closing_brace = 0 in the vimrc. This option should either be split into it's own option (e.g. let g:argwrap_wrap_opening_brace = 0) or the option should be renamed to e.g. let g:argwrap_wrap_brace = 0.
  3. I haven't yet tested it rigorously. Please try it and let me know if it works! :)