lilyball / rust.vim

Vim configuration for Rust.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

rust.vim

Description

This is a vim plugin that provides Rust file detection, syntax highlighting, and (optional) autoformatting.

Installation

Using Vundle

  1. Add Plugin 'rust-lang/rust.vim' to ~/.vimrc
  2. vim +PluginInstall +qall

Note: Vundle will not automatically detect Rust files properly if filetype on is executed before Vundle. Please check the quickstart for more details.

Using Pathogen

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

Using NeoBundle

  1. Add NeoBundle 'rust-lang/rust.vim' to ~/.vimrc
  2. Re-open vim or execute :source ~/.vimrc

Enabling autoformat

This plugin can optionally format your code using [rustfmt][rfmt] every time a buffer is written. Simple put let g:rustfmt_autosave = 1 in your .vimrc.

Help

Further help can be found in the documentation with :Helptags then :help rust.

License

Like Rust, rust.vim is primarily distributed under the terms of both the MIT license and the Apache License (Version 2.0). See LICENSE-APACHE and LICENSE-MIT for details.

About

Vim configuration for Rust.

License:Apache License 2.0


Languages

Language:Vim Script 100.0%