I am evaluating Atom, since I have wanted a good cross-platform editor for a while. One thing I miss from TextWrangler on the Mac is the “Zap Gremlins” feature that could convert selected text down to 7-bit ASCII (i.e. change “ and ” to ", … to …, — to --, etc.). I post a lot of text over a telnet connection that doesn’t like 8-bit characters at all, and this feature has been very convenient to me. I know it’s possible to do this conversion on the command line with “iconv”, but it’s awkward to say the least. Does Atom have anything like this, and I just haven’t found it yet? Or would it be possible to implement as a package?
If you can do it from the command line, Atom can do it as long as it has a package to tell it what to do. This hypothetical package would have a command along the lines of
gremlins:zap, which would run
atom.workspace.getActiveTextEditor().getText() (or just look up the file path), run
iconv through a
BufferedProcess, and replace the editor’s contents with the results.
I have made any packages. My understanding is anything you can do on the command line of your computer can be put into an Atom package. I very much hope I will be corrected if I am mistaken.
All the telnet I have done made a point of letting me know its would tolerate only 8-bit characters. Was I confused, and really it was all 7-bit?