Created
January 22, 2016 07:33
-
-
Save nixel2007/ed991d8001fbb59689fb to your computer and use it in GitHub Desktop.
save as utf-8-bom in atom
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
atom.workspace.observeTextEditors (editor) -> | |
editor.onDidSave -> | |
if editor.getPath().slice(-3) is '.os' | |
if editor.getEncoding() is 'utf8' and editor.getText().charCodeAt(0) isnt 65279 | |
editor.setText String.fromCharCode(65279) + editor.getText() | |
editor.save() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment