Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix comment indenting properly for Vim files. #7676

Closed

Conversation

chris-morgan
Copy link
Member

Indentation now works correctly on subsequent lines of a multi-line
comment, whether there are leaders (*) or not. (Formerly it was
incorrectly doing a two-space indent if there was no leader.)

By default, this no longer puts a * leader on /*! comments, as
that appears to be the current convention in the Rust source code, but
that can easily be re-enabled if desired:

let g:rust_bang_comment_leader = 1

Also a little fix which gets inline closures correct.

Was highlighting thus:

a::b::c(|x| {
        here;
        we;
        go;
        });

Will now highlight thus, as it should:

a::b::c(|x| {
    here;
    we;
    go;
});

Indentation now works correctly on subsequent lines of a multi-line
comment, whether there are leaders (` * `) or not. (Formerly it was
incorrectly doing a two-space indent if there was no leader.)

By default, this no longer puts a ` * ` leader on `/*!` comments, as
that appears to be the current convention in the Rust source code, but
that can easily be re-enabled if desired:

    let g:rust_bang_comment_leader = 1
@thestinger
Copy link
Contributor

Landing as part of #7707 to speed things up.

@thestinger thestinger closed this Jul 11, 2013
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants