-
Notifications
You must be signed in to change notification settings - Fork 13.1k
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
A few more changes for Vim #15476
Merged
Merged
A few more changes for Vim #15476
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/cc @chris-morgan This overlaps with some of what #15450 does as well. |
@@ -93,7 +109,8 @@ endif | |||
" Cleanup {{{1 | |||
|
|||
let b:undo_ftplugin = " | |||
\setlocal formatoptions< comments< commentstring< includeexpr< suffixesadd< | |||
\ setlocal formatoptions< comments< commentstring< includeexpr< suffixesadd< | |||
\|setlocal tabstop< shiftwidth< softtabstop< expandtab< textwidth< colorcolumn< |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ccu<
is only appropriate if exists('g:rust_colorcolumn')
.
Updated |
g:rust_fold allows folding to be enabled. This lets the user turn on folding without having to define autocommands.
Setting softtabstop makes <Del> delete 4 spaces as if it were a tab. Setting textwidth allows comments to be wrapped automatically. It's set at 80, which is the recommended line length for Rust programs. There are suggestions that it should be 79, but our current style guide says 80 so that's what we're matching. A new setting g:rust_colorcolumn sets colorcolumn as well, to +1,101. This indicates both the textwidth and the second stricter line length of 100 that our style guide lists.
The latest change to aturon/rust-guidelines states that lines must not exceed 99 characters. This gets rid of the 80/100 split, so we don't need to customize colorcolumn amymore.
Updated again, with the latest rust guidelines it appears our line length is just going to be 99. |
LGTM. |
bors
added a commit
that referenced
this pull request
Jul 16, 2014
Tweak the text editing settings (softtabstop, textwidth, etc). Add some settings to turn on folding and colorcolumn. Add the undo_ftplugin changes that my previous patch forgot.
bors
added a commit
to rust-lang-ci/rust
that referenced
this pull request
Feb 18, 2024
Substitute $saved_file in custom check commands If the custom command has a $saved_file placeholder, and we know the file being saved, replace the placeholder and run a check command. If there's a placeholder and we don't know the saved file, do nothing. This is a simplified version of rust-lang#15381, which I hope is easier to review.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Tweak the text editing settings (softtabstop, textwidth, etc).
Add some settings to turn on folding and colorcolumn.
Add the undo_ftplugin changes that my previous patch forgot.