Closed nicolai86 closed 8 years ago
I like the idea, I need more time to review it. I see that it creates a temp file. Does it work when you have multiple selections?
Thanks for the PR
@piuccio I played around with it - everything seems to work. Multiple regions, single regions, entire file.
The code throws an exception on Windows + ST3, it might be related to path and backward slash, I don't have a fix yet, hopefully I have more time later
@piuccio thanks for the first feedback. I've updated the code accordingly. Sadly I only have OS X + ST3 at hand, so I can only guess at why it crashes on windows, same as you.
@piuccio I had to remove the tempfile usage, it turns out the esformatter takes input from STDIN, too. It turns out the tempfile wasn't used, instead the code passed to communicate was being used.
I finally had some time to test it on Windows, works fine. Thanks for the PR
:+1:
Would be lovely with a release of this!
Yeah, I had an issue with my mac + sublime 3 so I've decided to postpone until I can investigate better. If you've got the same setup you can try installing from master branch and let me know if it works fine for you. This multi platform is a nightmare
I just tried it. I had to use https://github.com/int3h/SublimeFixMacPath to get it to pick up esformatter automatically. Unfortunately it no longer seems that it picks up the project roots .esformatter file, so the formatting is done using the defaults.
Not sure if I am doing something wrong, or the path fixer is the cause of it, but I never had problems with it before.
Bundling esformatter leads to all sorts of problems when the user wants to use different plugins. Instead, assume the user has esformatter installed globally via
npm install -g esformatter
.This means esformatter can be updated without updating this plugin, and it also means the user can configure esformatter more freely using
.esformatter
file.