AndrewRadev / splitjoin.vim

Switch between single-line and multiline forms of code
http://www.vim.org/scripts/script.php?script_id=3613
MIT License
1.93k stars 90 forks source link

Rust structs with visibility-specifiers on members are not split correctly #162

Closed z33ky closed 4 years ago

z33ky commented 4 years ago

When attempting to split structs with .e.g 'pub` members, all members are put in a single line.

struct Foo { pub x: u32, pub y: u32 }
//turns to
struct Foo {
    pub x: u32, pub y: u32
}
//expected
struct Foo {
    pub x: u32,
    pub y: u32,
}
AndrewRadev commented 4 years ago

Good catch, I'd missed that. Pushed a fix.

z33ky commented 4 years ago

I can confirm that it works now. Thanks again!