<commit_before># rust.vim

## Description

This is a Vim plugin that provides [Rust][r] file detection, syntax highlighting, formatting,
[Syntastic][syn] integration, and more. It requires Vim 8 or higher for full functionality.
Some things may not work on earlier versions. 

## Installation

Use one of the following package managers:

* [Vim8 packages][vim8pack]:
  * `git clone https://github.com/rust-lang/rust.vim ~/.vim/pack/plugins/start/rust.vim`
* [Vundle][v]:
  * Add `Plugin 'rust-lang/rust.vim'` to `~/.vimrc`
  * `:PluginInstall` or `$ vim +PluginInstall +qall`
  * *Note:* Vundle will not automatically detect Rust files properly if `filetype
on` is executed before Vundle. Please check the [quickstart][vqs] for more
details. Errors such as `Not an editor command: RustFmt` may occur if Vundle
is misconfigured with this plugin.
* [Pathogen][p]:
  * `git clone --depth=1 https://github.com/rust-lang/rust.vim.git ~/.vim/bundle/rust.vim`
* [vim-plug][vp]:
  * Add `Plug 'rust-lang/rust.vim'` to `~/.vimrc`
  * `:PlugInstall` or `$ vim +PlugInstall +qall`
* [dein.vim][d]:
  * Add `call dein#add('rust-lang/rust.vim')` to `~/.vimrc`
  * `:call dein#install()`
* [NeoBundle][nb]:
  * Add `NeoBundle 'rust-lang/rust.vim'` to `~/.vimrc`
  * Re-open vim or execute `:source ~/.vimrc`

## Features

### Error checking with [Syntastic][syn]

`rust.vim` automatically registers `cargo` as a syntax checker with
[Syntastic][syn], if nothing else is specified. See `:help rust-syntastic`
for more details.

### Source browsing with [Tagbar][tgbr]

The installation of Tagbar along with [Universal Ctags][uctags] is recommended
for a good Tagbar experience. For other kinds of setups, `rust.vim` tries to
configure Tagbar to some degree.

### Formatting with [rustfmt][rfmt]

The `:RustFmt` command will format your code with
[rustfmt][rfmt] if installed.

Placing `let g:rustfmt_autosave = 1` in your `~/.vimrc` will
enable automatic running of `:RustFmt` when you save a buffer.<commit_msg>Update README.md for 'filetype' and 'syntax on' requirements<commit_after># rust.vim

## Description

This is a Vim plugin that provides [Rust][r] file detection, syntax highlighting, formatting,
[Syntastic][syn] integration, and more. It requires Vim 8 or higher for full functionality.
Some things may not work on earlier versions. 

## Installation

For activating the full functionality, this plugin requires either the plugin
manager or the `.vimrc` to have the following:

```vim
syntax enable
filetype plugin indent on
```

Most plugin managers don't do this automatically, so these statements are
usually added by users in their `vimrc` _right after_ the plugin manager load
section.

### [Vim8 packages][vim8pack]

```sh
git clone https://github.com/rust-lang/rust.vim ~/.vim/pack/plugins/start/rust.vim
```

### [Vundle][v]

```vim
Plugin 'rust-lang/rust.vim'
```

### [Pathogen][p]

```sh
git clone --depth=1 https://github.com/rust-lang/rust.vim.git ~/.vim/bundle/rust.vim
```

### [vim-plug][vp]

```vim
Plug 'rust-lang/rust.vim'
```

### [dein.vim][d]

```vim
call dein#add('rust-lang/rust.vim')
```

### [NeoBundle][nb]

```vim
NeoBundle 'rust-lang/rust.vim'
```

## Features

### Error checking with [Syntastic][syn]

`rust.vim` automatically registers `cargo` as a syntax checker with
[Syntastic][syn], if nothing else is specified. See `:help rust-syntastic`
for more details.

### Source browsing with [Tagbar][tgbr]

The installation of Tagbar along with [Universal Ctags][uctags] is recommended
for a good Tagbar experience. For other kinds of setups, `rust.vim` tries to
configure Tagbar to some degree.

### Formatting with [rustfmt][rfmt]

The `:RustFmt` command will format your code with
[rustfmt][rfmt] if installed.

Placing `let g:rustfmt_autosave = 1` in your `~/.vimrc` will
enable automatic running of `:RustFmt` when you save a buffer.
{'fraction_non_alphanumeric': 0.13690476190476192, 'fraction_numerical': 0.002587991718426501, 'mean_word_length': 4.634110787172012, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 4, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '34880', 'n_tokens_mistral': 1342, 'n_tokens_neox': 1255, 'n_words': 444}