Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save wordijp/2db323f4a09fff0272a5a333cc5d4532 to your computer and use it in GitHub Desktop.
Save wordijp/2db323f4a09fff0272a5a333cc5d4532 to your computer and use it in GitHub Desktop.
rust-lang/rust.vimのrustfmtを日本語を含むソースに対応させる
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