S
S
So12010-11-05 21:20:47
PHP
So1, 2010-11-05 21:20:47

Emacs as an IDE for PHP?

Good afternoon.

I googled a little on the Internet, YouTube and habr, but did not find satisfaction with my question:
Can Emacs be a worthy replacement for NetBeans as a PHP IDE?

I use in NetBeans:
- Ctrl+Shift to get a human-readable javadoc to a function
- /** + Enter to write a JavaDoc to a function, class or file
- Alt+Shift+O to search for a file by name in the project
- Short-cut for uploading a file or files to the server via FTP
- Short-cut for svn commit/update

Does not apply to Emacs, because it's even a little more comfortable with buffers than NetBeans tab switching, but I usually use Ctrl+w to close tabs and Ctrl+Pg Down/Up to navigate tabs. In this regard, Emacs is cooler :)

So can Emacs do all this? As far as I understand, due to the lack of the concept of "project" in Emacs, I certainly won't get filename navigation in the project (which is quite frustrating :( )?

Answer the question

In order to leave comments, you need to log in

6 answer(s)
E
Exabiche, 2010-11-17
@Exabiche

If emacs is properly prepared, then there will be no problems with thick projects. Another thing is how much time you spend on it.

P
Pavel, 2015-07-23
Vyazovoi @Vyazovoi

Emacs is such a thing in which you can implement everything. The question usually consists in this - whether someone has already implemented it, or to implement it yourself.
As for specific questions, things like "project" don't have to be in Emacs out of the box, there are plenty of third party implementations. The most fashionable is proejctile. It contains a set of rules out of the box (you can add your own), by which it can determine the root of the project. For example, by having a .git directory in the root, or a composer.json file. Everything in Emacs is very well interconnected and integrated, so other packages can get project information from projectile. There is fizzy matching by file names, and working with vcs, and even saving window configuration by project.
I saw a method for generating phpdoc with automatic @param substitution in someone's config, in general, it is most likely googled on github.
But it’s bad with code analysis - work is being actively carried out by several people, but the solutions are far from phpstorm (I haven’t tried netbeans). There are several options, I think the most interesting is the direction in terms of PHP support in the built-in semantic package, there are developments. You can also use phptags/phpctags. By itself, ctags is from the universal-ctags branch. Global for PHP5 is currently none.
Here is a newly created group to coordinate work on PHP and Emacs: https://groups.google.com/forum/#!forum/emacs-php
There is also a debugger for xdebug: geben. It works, but it does not compare with the implementation in phpstorm.
There is a check for errors through flycheck. There are awesome tools for working with git (I don't like phpstorm).

B
BaBL, 2010-11-05
@BaBL

generally suitable for coding projects of medium thickness, large ones with thick frameworks will have problems with adding classes, etc.

A
andreysmind, 2010-11-17
@andreysmind

There is an add-on for Emax - Emacs Code Browser ecb.sourceforge.net/
Perhaps it will be useful.

E
Eugene, 2010-11-17
@immaculate

I can’t say anything specifically about PHP, except that it’s very difficult in Emacs with multi-modes, that is, when several languages ​​need to be recognized and highlighted in one file: PHP, HTML, CSS, Javascript.
There are several libraries, but they require powerful finishing, and I had problems with all of them. When I last looked at PHP support in Emacs, there was very little implemented and it worked very badly (that was about 5 years ago).
And in general, Emacs is powerful and convenient when you know all its combinations and know how to write Emacs Lisp, but I, after 13 or 14 years of using Emacs, switched to vim. At first I decided to try it because my hands started to hurt because of the RSI, then I got involved, then I switched to PyCharm with the IdeaVIM plugin and happiness came. Because after a short period of getting used to, it became clear that what PyCharm can do with Python code, Emacs can be taught after many years of persistent finishing ...
For PHP, JetBrains also seems to have some kind of IDE, I recommend taking a look.
The only thing I miss about Emacs is org-mode. This is a very powerful and convenient outliner.

V
VyusFire, 2014-03-26
@VyusFire

Like the author of this topic considers that yes. =)

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question