Skip to content

Instantly share code, notes, and snippets.

@thinca
Created April 23, 2009 17:40
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save thinca/100633 to your computer and use it in GitHub Desktop.
Save thinca/100633 to your computer and use it in GitHub Desktop.
if executable("native2ascii") && &modifiable
execute 'silent %!native2ascii -reverse -encoding ' . (&fileencoding == "" ? &encoding : &fileencoding)
augroup custom_ftplugin_jproperties
autocmd! * <buffer>
autocmd BufWritePre <buffer> execute 'silent %!native2ascii -encoding ' . (&fileencoding == "" ? &encoding : &fileencoding)
autocmd BufWritePost <buffer> execute 'silent %!native2ascii -reverse -encoding ' . (&fileencoding == "" ? &encoding : &fileencoding)
augroup END
endif
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment