So I checked out cedet and while the package seems good it's PHP support sucks, as in out of the box you get almost none, to get some you have to use either etags instead of the standard tags that comes with emacs or you have to use something from the contrib directory which is unmaintained. Not wanting to deal with etags I'm opting for updating the parser in the contrib directory. Using that a parser could be really interesting, as it means Emacs could know a lot more about the code and with some uh effort one could even have a very much up to date parser by using the grammar from the PHP code (Zend/something.y). Problem: It's a lot of effort for me and not a lot of help/interest from the community it seems.
But if I can pull it off, it would help creating refactoring, style, common error (using uninitialised variables) tools.
Showing posts with label php. Show all posts
Showing posts with label php. Show all posts
Friday, February 24, 2012
Sunday, February 19, 2012
PHP Class Browser
Idea for emacs:
I want to be able to
I haven't used cedet yet, but as it comes with emacs24 and is supposed to handle C++ it might already have such a thing but probably needs a "PHP parser"
I want to be able to
M-x something on a method call and get a new buffer showing all the implementations of that method and from there browse the methods of the class they belong to. And while we're at it a browseable class tree.I haven't used cedet yet, but as it comes with emacs24 and is supposed to handle C++ it might already have such a thing but probably needs a "PHP parser"
Thursday, March 25, 2010
githubbed
I githubbed the code from the previous post. It's now at http://github.com/tekai/tools. Also php-run-string has been fixed.
Tuesday, March 16, 2010
emacs/php code
Some interesting functions if you happen to write PHP code in emacs:
php-mode.el with some modifications:
;; - php-check-syntax-and-goto-line bound to F12 ;; - changed the find-tag-default function to differentiate between ;; methods and functions BUT this means you need to use tag-fucker.php ;; instead of etags/ctags/whatever
tag-fucker.php (rename it to use it). A CLI script which generates TAGS/etags stuff used in my php-mode. Much slower than etags but maybe it can by compiled by HipHop.
php.el Some extra php related elisp code. Them gem of it is update-tag-file which does what it says on saving a file ((php-)after-save-hook)
Those files need a bit of shell & elisp knowledge if you want to use them. Go and hack away. If you like/use/modified it pls leave a comment.
Subscribe to:
Posts (Atom)