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

A few more changes for Vim #15476

Merged
merged 3 commits into from
Jul 16, 2014
Merged

A few more changes for Vim #15476

merged 3 commits into from
Jul 16, 2014

Conversation

lilyball
Copy link
Contributor

@lilyball lilyball commented Jul 6, 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.

@lilyball
Copy link
Contributor Author

lilyball commented Jul 6, 2014

/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<
Copy link
Member

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').

@lilyball
Copy link
Contributor Author

lilyball commented Jul 6, 2014

Updated

lilyball added 3 commits July 7, 2014 22:18
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.
@lilyball
Copy link
Contributor Author

lilyball commented Jul 8, 2014

Updated again, with the latest rust guidelines it appears our line length is just going to be 99.

@lilyball
Copy link
Contributor Author

r? @chris-morgan

@chris-morgan
Copy link
Member

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 bors closed this Jul 16, 2014
@bors bors merged commit 9dc667d into rust-lang:master Jul 16, 2014
@lilyball lilyball deleted the more_vim_tweaks branch August 13, 2014 23:42
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
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants