Last active
May 23, 2016 10:06
-
-
Save wordijp/2db323f4a09fff0272a5a333cc5d4532 to your computer and use it in GitHub Desktop.
rust-lang/rust.vimのrustfmtを日本語を含むソースに対応させる
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function! rustfmt#Format() | |
let l:curw = winsaveview() | |
let l:tmpname = expand("%:p:h") . "/." . expand("%:p:t") . ".rustfmt" | |
- call writefile(getline(1, '$'), l:tmpname) | |
+ " keep file format | |
+ :execute ":w " . l:tmpname |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment