Linux Only (sort of): I once was a fan of heavy development environments such as Eclipse or Zend Studio, but not anymore. Don’t get me wrong. They are very powerful, but in a way too powerful, or rather, too heavy. PHP is a scripting language, likewise, a PHP editor should be fast and easy to get on and start writing. With a few plugins and modifications you can get gedit to be both a powerful and beautiful editor for PHP, and other languages. This guide will help you to get gedit to resemble something like Textmate for Mac. (This will only work with gedit 2.20+)

File Browser: This is an excellent plugin that shows the file browser on the left. This even allows you to use connections made from nautilus (the default file explorer for GNOME). Meaning that you can connect to through FTP, SFTP, SSH, Windows share, WebDav, and well, do you really need anything else? To enable it, under Edit select Preferences. Then click the Plugins tab and check File Browser. If it doesn’t show up make sure you enable the side pane under View (or press F9).
Snippets: With snippets, you can easily type a keyword (say, function) and hit tab, and it will create the full structure based on the keyword as a template. You can even modify or create new snippets as you please for each language. Once created, you can use tab to skip between each section. This one also comes with gedit by default, so enable it just as you did with the file browser.
Darkmate: This is the dark theme that I use and prefer. The darker background is easier on my ways because often enough I sit there staring at my screen coding for hours on end. It really helps my eyes, plus the contrast makes things a bit easier to find. You can find the theme here (just scroll down to Dark Styles). Download the XML file and save it under ~/.gnome2/gedit/styles/. Restart gedit and it should show up under Preferences in the Font & Color tab.
SnapOpen: Allows you to quickly open a file based on the current directory of file browser. It will search for the filename under all sub-directories and quickly find the match for the file you are looking for. This one you can download from here. Just extract all the files to ~/.gnome2/gedit/plugins and it should show up in the Plugins tab in Preferences. Once enabled, just press Ctrl+Alt+O to open the SnapOpen window, type a few letters of a filename and the matches should start showing up.

Quick Highlight Mode: This has been useful a few times, specially if you write in other languages that can be embedded with HTML such as Python, where gedit’s syntax highlight won’t highlight both (I’m sure there might be a better way to doing it but I haven’t found it yet). You can download the plugin from here: http://svn.simplesideias.com.br/general/gedit/plugins/quickhighlightmode/. Use svn export and place the files in ~/.gnome2/gedit/plugins/. Once installed and enabled, press Ctrl+Shift+H to use. Type the name of the language you want to use and hit enter.
Symbol Browser: The last plugin allows you to quickly browse through a list of functions and variables in the current file. The installation of this plugin requires a bit more work because of a dependency. First, you need to install exuberant ctags. You can do this from your terminal by typing:
Once exuberant ctags is installed, you can download the Symbol Browser plugin from here. If you can use the binary files available here (AMD64), then just extract it to ~/.gnome2/gedit/plugins/ and enable it. Otherwise, you will have to compile it. The author of Symbol Browser has a guide on doing so here.
Now you have an excellent development editor for writing PHP, or really any language. It does not do any advanced things such as project management, building, etc. (Unless you can write up plugins to do it for you) but it does its job, and does it well. One annoying thing is this bug that happens if you use gedit a lot. Just restart it and you should be back to par (I can’t wait until its fixed!)
I hope that this list of plugins will help you get the best editor for your development. Let us know how you like it. If you have any suggestions or additions to this list, feel free to post a comment below.
3 Responses
pambuk
April 9th, 2008 at 4:35 am
1Nice, I’d also recommend adding monaco.ttf to ~/.fonts
Cheers.
Anton Egorov
April 9th, 2008 at 3:22 pm
2I searching for good class browser like outline view in Eclipse PDT. Can you help me?
Jamal
April 9th, 2008 at 3:27 pm
3Anton Egorov,
I’m not certain of any that do it with Eclipse as I have not used Eclipse in quite a while. I really think the default Eclipse PDT had an Outline view. If not, you can try Aptana (aptana.com) and see if it has it. Aptana is just an Eclipse based IDE.
RSS feed for comments on this post · TrackBack URI
Leave a reply
Categories
Social Bookmarks
Meta