On Friday, October 26, 2012 8:49:48 AM UTC-5, Gerg wrote:
> Hello everyone. I am new to VIM.
>
> I would like to write/print my PHP localhost results to *.txt or HTML file. Is that possible?
>
> Thank you!
I have no idea what you are asking here.
Vim is a text editor. It sounds like you're asking how to run a PHP script on your local machine, which has nothing to do with a text editor. If that is not what you are asking, please clarify.
If you are asking how to run a PHP script which you currently have loaded in Vim, then I imagine you have some external program to run your script. Vim can run external programs easily.
I have no idea how PHP works outside a webserver, so let's assume for demonstration's sake that you can run a process called "php" with a file as input, printing to stdout. This may not be the case, but the concepts should be similar. Assuming this, you could do:
:!php % > somefile.html
to process the current file with a php command and redirect the output to a file.
Possibly you can also use something like:
:compiler php
:make
but I don't actually know what that will accomplish. I only know there is a php compiler plugin distributed with Vim.
--
You received this message from the "vim_use" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php
Friday, October 26, 2012
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment