1.sublime text 3 => install package => Rust
2.cd ~/.config/sublime-text-3/Packages
3.mkdir rust
4.git clone https://github.com/sp0/rust-style
5.cd rust-style
6.cargo build --release
7.ctrl+shift+p => Rust Code Formatter: Set Path =>?
? ? /home/xiaotie/.config/sublime-text-3/Packages/rust/rust-style/target/release/rust-style
8.keybinding user =>
? ? {
? ? ? ? "keys": ["ctrl+e", "ctrl+d"], "command": "rust_code_formatter_format",
? ? ? ? "context":
? ? ? ? [
? ? ? ? ? ? {"key": "selector", "operator": "equal", "operand": "source.rust"}
? ? ? ? ]
? ? }
原文:http://wudixiaotie.iteye.com/blog/2223780