Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

I am looking for a text editor with the following functionalities for php, html and css coding:

  • code folding
    • based on indentation (best example is EditPlus)
    • start at an indentation level and stop at the next indentation of same level or level up
  • line/block duplication
  • brace highlight
  • syntax highlight
  • selection highlight (occurrences)
  • toggle comment line/block
  • good file browser (several directories opened)
  • code snippets

Those are the basic I am looking for. I tried several editors and found them all wanting at some point.

  • Gedit with plugins
  • Geany with plugins
  • Juffed
  • jEdit
  • scite
  • ultraedit ...

The only one really close to have it all is Netbeans except for the code folding based on indentation.

I read that vim is highly configurable but I'm a bit afraid of the learning curve.

If anyone know of my dream editor, please inform me.

share|improve this question
    
For some reason, code folding based on indentation is hard to find. Have you tried seeing if there's a Netbeans plugin that offers at least close to what you want? The closest I've seen otherwise is Microsoft's Visual Studio, and even that I don't think is exactly what you're looking for (though you can make custom code folding regions; that's one thing I do miss in my move from .Net to PHP). –  Shauna Jul 26 '11 at 13:19
1  
geany has indention based folding on python files –  enzotib Jul 26 '11 at 14:18
    
If you are not using a version control system start considering about it, although its always convenient to handle the source control from a terminal I like my editor having a support for it. Git mercurial svn cvs you name it. –  topless Jul 26 '11 at 14:19
    
i already use git for personnal projects and svn at work, all in command lines, so it can be a good addition. –  GMO Jul 27 '11 at 8:13
add comment

4 Answers

up vote 3 down vote accepted

Vim, or Vi IMproved, provides all of the features you've mentioned (and more) at a relatively low performance hit.

I highly recommend the program vimtutor to get you started. It always comes with Vim, and you can run it from a terminal.

I've used Vim for about a year now, and it's saved me loads of time.

There's a wiki, too.

After you pick up on the basics, it's faster than most editors out there.

share|improve this answer
    
Related to requirements and VIM: stackoverflow.com/questions/1551231/… –  Seppo Erviälä Sep 11 '11 at 20:07
    
add comment

It is worth giving a try to eclipse, its cross platform, open source and there is a plugin for everything, although the functionality you are looking for is already natively supported. More information here.

Vim is great too, as long as your wrap you brain around the keystrokes and the input modes its pretty cool to work with it, especially in a command line environment where a powerful editor sometimes is more than necessary. I would advise you to print a vim shortcut cheat sheet and give it a try on your free time.

share|improve this answer
    
I agree with Eclipse. It's a good deal heavier than some of the other things you've tried, but it's quite mature and can do everything you want. Vim takes a lot of patience buts its users love it. –  Oli Jul 26 '11 at 13:11
    
Eclipse is way too slow, even on ubuntu. An no folding on indent level. –  GMO Jul 27 '11 at 15:55
add comment

Emacs will do all of that and much, much more. It does have a bit of a learning curve, but is quite a bit more user friendly than vim, and has a graphical front end and an excellent built in manual.

share|improve this answer
    
I wouldn't exactly call Lisp and Perl programming user friendly. As long as it concerns the learning curve IMO emacs will take further long than vim. The power that raises from emacs is well worth it, still requires a lot of time to configure and find your way around, as getting a better grasp in scripting. I wouldn't recommended for users with little or no experience all IMO always, the best thing to do is to try and see which product fits your needs. –  topless Jul 26 '11 at 14:17
1  
@Chris-Top what does lisp and perl programming have to do with anything? Much of emacs is written in lisp but you hardly have to learn the language an editor is written in to use it. Perl has nothing to do with emacs. –  psusi Jul 26 '11 at 15:33
    
You are absolutely right, it was me few years ago trying to pick up Perl and Emacs just to enrich my tools divercity and since then still hunts me down, I lost my sleep at night... Thank you for the clarifications. I cannot handle the pressure! –  topless Jul 27 '11 at 12:14
add comment

Surely Emacs. Here's the best Emacs tutorial I've ever seen:

http://xahlee.org/emacs/emacs.html

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.