New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Feature Request] Integrate cfscript.me to convert tags to cfscript #73

Closed
cybersonic opened this Issue May 5, 2017 · 6 comments

Comments

Projects
None yet
4 participants
@cybersonic

cybersonic commented May 5, 2017

cfscript.me is a great resource by @pfreitag that would be great to add to the plugin so you can convert selections or whole files.

@pfreitag

This comment has been minimized.

Show comment
Hide comment
@pfreitag

pfreitag May 5, 2017

Contributor

Hey guys I also just released a commandbox command for it - might be able to integrate with that

Contributor

pfreitag commented May 5, 2017

Hey guys I also just released a commandbox command for it - might be able to integrate with that

@jcberquist

This comment has been minimized.

Show comment
Hide comment
@jcberquist

jcberquist May 5, 2017

Owner

@pfreitag Your commandbox command currently only works on whole files, correct? It is relatively easy to run a box command on the current file by adding a build system entry for it. For example you could create a cfscriptme.sublime-build file in your ST User package folder with the following contents:

{
	"shell_cmd": "box cfscriptme sourcePath=\"$file_name\" force=true",
	"selector": "embedding.cfml"
}

Then when a CFML file is open you can use CTRL+SHIFT+B to call up the build menu and select cfscriptme. This will work on the entire contents of the current file. Unfortunately it can be very slow to execute as it has the overhead of starting the box binary each time.

What about posting to your cfscript.me api endpoint? Is that doable, and are you comfortable with that approach? (I have no idea if and how much traffic that might generate.) I suspect going that route would be faster and would have the added benefit of allowing for the conversion of selections rather than having to do it on whole files. But I certainly understand you might not want that.

Long term I would like to figure out how to open and maintain a box shell session via ST so that commands could be run without having to start the box binary each time. I think that is doable, but I haven't had time to look into it. I certainly don't want to do it incorrectly and start bringing down ST users' machines.

Owner

jcberquist commented May 5, 2017

@pfreitag Your commandbox command currently only works on whole files, correct? It is relatively easy to run a box command on the current file by adding a build system entry for it. For example you could create a cfscriptme.sublime-build file in your ST User package folder with the following contents:

{
	"shell_cmd": "box cfscriptme sourcePath=\"$file_name\" force=true",
	"selector": "embedding.cfml"
}

Then when a CFML file is open you can use CTRL+SHIFT+B to call up the build menu and select cfscriptme. This will work on the entire contents of the current file. Unfortunately it can be very slow to execute as it has the overhead of starting the box binary each time.

What about posting to your cfscript.me api endpoint? Is that doable, and are you comfortable with that approach? (I have no idea if and how much traffic that might generate.) I suspect going that route would be faster and would have the added benefit of allowing for the conversion of selections rather than having to do it on whole files. But I certainly understand you might not want that.

Long term I would like to figure out how to open and maintain a box shell session via ST so that commands could be run without having to start the box binary each time. I think that is doable, but I haven't had time to look into it. I certainly don't want to do it incorrectly and start bringing down ST users' machines.

@pfreitag

This comment has been minimized.

Show comment
Hide comment
@pfreitag

pfreitag May 5, 2017

Contributor

@jcberquist This is probably something that I could open up an API for in the future, but in the near term I think the local execution route is preferable.

Contributor

pfreitag commented May 5, 2017

@jcberquist This is probably something that I could open up an API for in the future, but in the near term I think the local execution route is preferable.

@jcberquist

This comment has been minimized.

Show comment
Hide comment
@jcberquist

jcberquist May 5, 2017

Owner

@pfreitag Makes sense to me, thanks. @cybersonic so for now I would recommend adding a build system entry to your user package folder, and maybe down the road I can do something more comprehensive.

Owner

jcberquist commented May 5, 2017

@pfreitag Makes sense to me, thanks. @cybersonic so for now I would recommend adding a build system entry to your user package folder, and maybe down the road I can do something more comprehensive.

@Thom1729

This comment has been minimized.

Show comment
Hide comment
@Thom1729

Thom1729 Jun 22, 2017

As it happens, I wrote a Sublime command that does the same thing a while back. It has advantages and disadvantages compared to sublime.me. If native Sublime integration is a sticking point, this command might be of use.

Thom1729 commented Jun 22, 2017

As it happens, I wrote a Sublime command that does the same thing a while back. It has advantages and disadvantages compared to sublime.me. If native Sublime integration is a sticking point, this command might be of use.

@jcberquist

This comment has been minimized.

Show comment
Hide comment
@jcberquist

jcberquist Jun 22, 2017

Owner

@Thom1729: If you want to contribute it, I would happily include it in this package. Or you could submit it to Package Control directly. Either way, I think it would be great to make it available.

Owner

jcberquist commented Jun 22, 2017

@Thom1729: If you want to contribute it, I would happily include it in this package. Or you could submit it to Package Control directly. Either way, I think it would be great to make it available.

@jcberquist jcberquist closed this Nov 25, 2017

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment