diff options
| author | bors <bors@rust-lang.org> | 2013-05-07 19:21:37 -0700 |
|---|---|---|
| committer | bors <bors@rust-lang.org> | 2013-05-07 19:21:37 -0700 |
| commit | 3c4b32cdbe7304e6bd033ff6bb4b23a1f18e8af0 (patch) | |
| tree | 7ec376037ec80ba24939a6f1aca284d1872d969f | |
| parent | d35eb6e1ee58f795bc77cb59aa1829f725db90e0 (diff) | |
| parent | 80b2926357232f8674df2c1db24bb91f24628e2f (diff) | |
| download | rust-3c4b32cdbe7304e6bd033ff6bb4b23a1f18e8af0.tar.gz rust-3c4b32cdbe7304e6bd033ff6bb4b23a1f18e8af0.zip | |
auto merge of #6259 : Aatch/rust/vimfile, r=bstrie
`colorcolumn` is now set with `setlocal`, so it doesn't infect the entire session. `conceal` support is now opt-in, not opt-out. I haven't found anybody that likes it or cares either way. The indent file now uses `cindent` with appropriate `cinoptions` and `cinkeys`. Auto-indenting an entire file mostly gets the right thing now, with structs and enums not being affects like before. Defaults to the hanging indent style, unless the first argument is on a new line. There were some keywords in the syntax file that I've never seen (and have been used as identifiers in some tests) so they have been commented out.
| -rw-r--r-- | src/etc/vim/after/ftplugin/rust.vim | 2 | ||||
| -rw-r--r-- | src/etc/vim/after/syntax/rust.vim | 2 | ||||
| -rw-r--r-- | src/etc/vim/indent/rust.vim | 5 | ||||
| -rw-r--r-- | src/etc/vim/syntax/rust.vim | 2 |
4 files changed, 7 insertions, 4 deletions
diff --git a/src/etc/vim/after/ftplugin/rust.vim b/src/etc/vim/after/ftplugin/rust.vim index f0f1c85ee97..a053f8b40f8 100644 --- a/src/etc/vim/after/ftplugin/rust.vim +++ b/src/etc/vim/after/ftplugin/rust.vim @@ -1,5 +1,5 @@ "Highlight the 100th text column "Feature became available in v7.3 if version >= 703 - set colorcolumn=100 + setlocal colorcolumn=100 endif diff --git a/src/etc/vim/after/syntax/rust.vim b/src/etc/vim/after/syntax/rust.vim index 58a623cb4e4..75afe3d0368 100644 --- a/src/etc/vim/after/syntax/rust.vim +++ b/src/etc/vim/after/syntax/rust.vim @@ -1,4 +1,4 @@ -if exists('g:no_rust_conceal') || !has('conceal') || &enc != 'utf-8' +if !exists('g:rust_conceal') || !has('conceal') || &enc != 'utf-8' finish endif diff --git a/src/etc/vim/indent/rust.vim b/src/etc/vim/indent/rust.vim index 43fd917fc97..8d973c9a870 100644 --- a/src/etc/vim/indent/rust.vim +++ b/src/etc/vim/indent/rust.vim @@ -5,4 +5,7 @@ if exists("b:did_indent") endif let b:did_indent = 1 -setlocal smartindent + +setlocal cindent +setlocal cinoptions=L0,(0,Ws,JN +setlocal cinkeys=0{,0},!^F,o,O diff --git a/src/etc/vim/syntax/rust.vim b/src/etc/vim/syntax/rust.vim index eab3627ae16..3b5324f5cce 100644 --- a/src/etc/vim/syntax/rust.vim +++ b/src/etc/vim/syntax/rust.vim @@ -29,7 +29,7 @@ syn match rustIdentifier contains=rustIdentifierPrime "\%([^[:cntrl:][:spac syn match rustFuncName "\%([^[:cntrl:][:space:][:punct:][:digit:]]\|_\)\%([^[:cntrl:][:punct:][:space:]]\|_\)*" display contained " Reserved words -syn keyword rustKeyword m32 m64 m128 f80 f16 f128 be +"syn keyword rustKeyword m32 m64 m128 f80 f16 f128 be " These are obsolete syn keyword rustType int uint float char bool u8 u16 u32 u64 f32 syn keyword rustType f64 i8 i16 i32 i64 str Self |
