Sublime Forum

phpInstant (execute your code in SublimeText2)

#1

Hello everybody,

i thought it would be* verry usefull* to execute php-code within SublimeText2, so i decided to create a plugin for that.
There you go: https://github.com/PhilippSchaffrath/phpInstant

README.md for more information, hopefully soon at PackageControl!

Kindly regards
Philipp Schaffrath

0 Likes

#2

I love it :smile: Super simple and it seems to work perfectly for me!

0 Likes

#3

Thank you for your response, i am glad to hear you like it.

Btw. i released an update just a minute ago, here are some major changes:

  • Changed the Context Menu
  • Changed all the Shortcuts (Ctrl+Shift+X for run in PHP-Mode, Ctrl+Shift+Y or Z for selecting a Mode)
  • Added Quick Panel to select run Mode (Ctrl+Shift+Y or Z)
  • Nummered Lines in Multilineview (default-view)
  • Seperated between two modes (if the selected Code starts with PHP or HTML (or Plaintext))
  • Improved the standard-mode (PHP-Mode)
  • Improved visibility-behaviour
  • Deleted regular-expression import (its not necessary)

I hope my plugin will ease some guys work, have a good night everybody!

0 Likes

#4

I’m not getting any output either when selecting text or executing the whole page. Am I doing something obviously wrong or is my setup?

I am on windows 7, selected some text, hit ctrl+shift+x and the output window shows, but nothing is in it.

0 Likes

#5

Could you please post the code you are trying to execute?

0 Likes

#6

[quote=“jprado”]I’m not getting any output either when selecting text or executing the whole page. Am I doing something obviously wrong or is my setup?

I am on windows 7, selected some text, hit ctrl+shift+x and the output window shows, but nothing is in it.[/quote]

I’m having the same problem, is there some stuff this plugin depends upon?

this was my test code:

<?php print 'I am noob'; ?>
0 Likes

#7

Pressing Ctrl+Alt+X?

It works fine for me :smile:

Make sure PHP is in your Path on Windows.

0 Likes

#8

PHP dont need to be in your path, like described in the readme, you could set the binary path in your config.
I am currently working on a plugin wich will work for all interpreter languages, please give me some more days to finish the new plugin. I will post here when it is finished!

0 Likes