Skip to content
This repository was archived by the owner on Dec 26, 2023. It is now read-only.

Feature Request: List starts on same line #8

Open
ns-bak opened this issue Jul 11, 2016 · 3 comments
Open

Feature Request: List starts on same line #8

ns-bak opened this issue Jul 11, 2016 · 3 comments

Comments

@ns-bak
Copy link

ns-bak commented Jul 11, 2016

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.

@thornycrackers
Copy link

+1

This would be a super awesome feature to have

@landersson
Copy link

+1

yochem added a commit to yochem/vim-argwrap that referenced this issue Jul 7, 2020
Description:
This commit adds the option to start a list on the same line, as
proposed in issue FooSoft#8. By this, a wrapped list would become:

    void foo(var1,
             var2,
             var3)

instead of:

    void foo(
        var1,
        var2,
        var3
    )

For now, the option is implemented using

    let g:argwrap_wrap_closing_brace = 0

The configuration can be extended to see this option as seperate.

Warning!
It assumes the indentation is done with spaces instead of tabs

Relevant issue: FooSoft#8 (FooSoft#8)
@yochem
Copy link

yochem commented Jul 7, 2020

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! :)

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants