News for hackers. Stuff that matters.

Ask HN: What editor do you use?

More specifically then the general title, what editor (or IDE) do you use, and for what languages. Why do you use this editor, and what features does it give?

I am most interested in Python, Ruby, and Javascript.

I currently use Aptana for javascript editing. It gives me a nice editor (I like eclipse editor), a 1/2 useful outline, sometimes actually does auto-completion of variables instead of me having to type it all out, A pretty decent code formatter, and a tad bit of syntax errors as you type. However I am not a big fan of it, it has a bunch of features but its more of a jack of all trades master of none editor. Most features are incomplete at best.

( 57 comments | 21 points | on HN )
Re:Ask HN: What editor do you use? by andrewljohnson on Tuesday December 30, 2008 @03:21AM (#414077)
Eclipse, and I mostly hack in Python and Javascript. Why, why you say?

I guess just three main reasons:

1) I am a very visual person, and like to see the project hierarchy. I like to click the file I want, instead of just using my keyboard. I know this flies in the face of the purist Emacs and Vim users, but I'm only about half hacker, and I like my clickey click.

2) I like the tabs at the top (as opposed to buffers that you can't see). I like to see the group of files I'm currently working with.

3) I like the Aptana plug-in, which does nice mark-up of HTML, Javascript, etc. It makes Eclipse a fairly nice web coding editor. I also like Pydev. So Eclipse supports all my favorite languages.

I do wish Eclipse were faster and stripped of many of its components. Also, I do use the command line for things like SVN and running commands in the terminal like "python manage.py runserver." But I like Eclipse as an editor.

Maybe it's just because Eclipse is what I'm used to. I suspect that is the root of all preference.

Re:Ask HN: What editor do you use? by 1gor on Tuesday December 30, 2008 @08:29AM (#414196)
Emacs can be very visual if you use ECB (check http://emacsonrails.drozdov.net screencast for an example):

a) A directory tree b) a list of source files in the current directory c) a list of functions/classes/methods/… in the current file, (ECB uses the Semantic Bovinator, or Imenu, or etags, for getting this list so all languages supported by any of these tools are automatically supported by ECB too) d) a history of recently visited files, e) the Speedbar (directory hierarchy) and f) output from compilation (the “compilation” window) and other modes like help, grep etc. or whatever a user defines to be displayed in this window.

Re:Ask HN: What editor do you use? by andrewljohnson on Tuesday December 30, 2008 @01:20PM (#414478)
You always get this answer from emacs users. "Emacs can do such and such."

But the reason Eclipse probably hooked me is it does these things out of the box. There's just such a huge barrier to entry to using emacs, that being the burden of configuring it to your liking and/or learning the arcane keyboard shortcuts.

Re:Ask HN: What editor do you use? by bmj on Tuesday December 30, 2008 @09:45AM (#414240)
I do a lot of day job programming in ColdFusion (no, really), and CFEclipse does the best job with handling ColdFusion code, Javascript, HTML, and CSS in a single file (Komodo Edit, using PHP mode, does a pretty good job, too, but it's a bit slow). Initially, I didn't want to switch because many of the keybindings I was used to weren't there, but after spending some time configuring the IDE, I use it for everything (including editing SQL scripts).
Re:Ask HN: What editor do you use? by immad on Tuesday December 30, 2008 @07:50AM (#414178)
vim 7 has tabs the are sooo useful. :tabe filename to open something in a new tab and gt to flip between them
Re:Ask HN: What editor do you use? by dhotson on Tuesday December 30, 2008 @12:54AM (#413985)
I use Vim & jEdit.

I use Vim for editing stuff from a shell.. mostly small to medium size editing tasks. It's really good once you've got it set up properly. You can get all the usual stuff you get in IDE's such as syntax highlighting, split windows and tabs, autocompletion, source control integration.. the mouse works great too. Actually learning how to use Vim effectively takes some practise, but it's totally worth it.

For more heavyweight editing/programming tasks I use jEdit.. it's a really good editor for nearly any language. You'll probably want to get some plugins for it though, the vanilla install is a bit basic.

Re:Ask HN: What editor do you use? by SwellJoe on Tuesday December 30, 2008 @02:29AM (#414042)
vim or emacs: pick one and get back to work. Editing text is a solved problem.
Re:Ask HN: What editor do you use? by Prrometheus on Tuesday December 30, 2008 @06:23AM (#414142)
I'm learning Python in emacs after learning Matlab with its default editor and environment. I miss the visual file trees and the easy visual debugging, though I haven't completely gotten used to the emacs way of doing things yet. It does strike me that learning the emacs way is harder.
Re:Ask HN: What editor do you use? by alexkay on Tuesday December 30, 2008 @07:13AM (#414160)
Debugging is overrated, at least for Python. Have a clean codebase with a good test coverage and you will never miss the visual debugger.
Re:Ask HN: What editor do you use? by Prrometheus on Tuesday December 30, 2008 @07:32AM (#414166)
Doesn't emacs really make more sense for a low-level language, though? A programmable editor seems like it would be more helpful with more code and more code repetition. Maybe it's because I'm starting with Matlab/Ruby/Python, but I really don't get why emacs and vim are so awesome.

I'm following the advice of the sages and learning emacs anyways. But mostly it's because I figure the sages are smarter than I am than actually seeing the need for it.

Also, debuggers are REALLY useful when you're learning a language for the first time. I shudder to think what my last machine learning project would have been like without a debugger. Maybe when I'm an ace, I can "just write good code and tests". But I'm not an ace, I'm a newb. I like seeing what my variables are doing and trying out commands that I think might do what I want them to do.

Re:Ask HN: What editor do you use? by scott_s on Tuesday December 30, 2008 @09:18AM (#414223)
I relied on a visual debugger (in Visual Studio) for much of my undergrad. In grad school (including now), I rely on gdb and printf/cout statements to debug my code.

I find printing the value of variables, and saving the record to a file, a valuable means of debugging. Instead of only knowing the current state, I can construct a picture of the entire execution of my program. Gdb also lets me do most of the things I did in Visual Studio. Most importantly, it tells me the line where the program crashed, and if I need to, it can tell me the state of variables.

Notice this has nothing to do with the editor I use (although I use vi). Visual Studio is an Integrated Development Environment - IDE. Once you learn enough Unix tools, Unix itself becomes your IDE.

Re:Ask HN: What editor do you use? by SwellJoe on Tuesday December 30, 2008 @04:38PM (#414709)
Also, debuggers are REALLY useful when you're learning a language for the first time.

Yes, they are. I thought we were talking about text editors?

Re:Ask HN: What editor do you use? by Prrometheus on Tuesday December 30, 2008 @04:59PM (#414732)
Don't you edit text when you are new to a language?
Re:Ask HN: What editor do you use? by shutter on Tuesday December 30, 2008 @12:31AM (#413971)
Currently, TextMate. Started learning Emacs, though, and hope to get proficient in that soon (via O'Reilly's "Learning GNU Emacs"). TextMate's showing its age, for me at least, and I'm hopeful that Emacs will be more powerful and faster.
Re:Ask HN: What editor do you use? by astrec on Tuesday December 30, 2008 @08:54AM (#414207)
I went from Emacs to Textmate and back again: Textmate showed much promise as a modern programmable editor, but as it turns out I work several times faster in Emacs. Time is money and all that.
Re:Ask HN: What editor do you use? by kirubakaran on Tuesday December 30, 2008 @09:18AM (#414222)
Re:Ask HN: What editor do you use? by icey on Tuesday December 30, 2008 @10:27AM (#414278)
A thousand thank yous for having a .emacs file that has been commented so well and is so easily understandable.
Re:Ask HN: What editor do you use? by kirubakaran on Tuesday December 30, 2008 @11:08AM (#414315)
You are most welcome and thanks a lot. Your comment made me so happy :-)
Re:Ask HN: What editor do you use? by qhoxie on Tuesday December 30, 2008 @12:47AM (#413980)
vim and gedit. gedit has come a long way with its plugins, definitely worth checking out.

scribes is another one worth looking, but lack of tab support keeps me with gedit.

Re:Ask HN: What editor do you use? by nailer on Tuesday December 30, 2008 @03:19PM (#414613)
Wow, I never expected as many people would be open minded towards gedit. Sometimes in Unix, it's hard to convince anyone that something with easier, more discoverable customization is better than vim.

Wish it had a tabbed terminal, and code folding though.

Re:Ask HN: What editor do you use? by rsayers on Tuesday December 30, 2008 @08:10AM (#414185)
Emacs

I do PHP professionally, mainly Ruby with my own projects, but I dabble with lots of languages.

It's very powerful and any feature it doesn't have, I can add myself. Yesterday I was prototyping something for work, I had my main php file open along with the js and css files all in their own split window. More than one co worker stopped in to see what editor I was using after noticing my screen.

The learning curve is very high, but print out a cheat sheet and keep it near you, in less than a week I had the basic functions memorized and now rarely need to look up a command (generally an obscure one). Once you get the hang of it though, every other editor feels crippled, that's my experience at least.

Re:Ask HN: What editor do you use? by rickharrison on Tuesday December 30, 2008 @01:44AM (#414019)
I live and die via Coda (www.panic.com) Best editor I could ask for.
Re:Ask HN: What editor do you use? by teej on Tuesday December 30, 2008 @09:02AM (#414210)
I found that Coda was incredibly useful for PHP and flat HTML/CSS and hardly useful for anything else.
Re:Ask HN: What editor do you use? by unalone on Tuesday December 30, 2008 @12:00PM (#414366)
It's much better for PHP and HTML/CSS. It's geared towards that. For other languages it's just as powerful, but it doesn't have the same one-window-does-everything aspect to it.
Re:Ask HN: What editor do you use? by basil on Tuesday December 30, 2008 @02:37AM (#414047)
You've listed scripting languages there which arguably means you don't necessarily need an IDE. By this I mean, there is no code-compile-test cycle and you don't need an IDE to take care of your builds.

Possibly the most efficient way of coding would be in a shell with your choice of Vim or Emacs. You have quick access to your choice of VCS, you can tail log files, you can use your language's REPL and you can grep for things across your whole project. As well you will have minimised your usage of the mouse which is a great speed and flow inhibitor.

Take the time to learn either of the 2 great editors. The investment will most certainly pay off.

Re:Ask HN: What editor do you use? by vorador on Tuesday December 30, 2008 @02:40AM (#414049)
Which editor we use doesn't matter, pick an editor an know it _well_

Btw, emacs has an excellent mode for editing python and I couldn't live without its auto-indent feature

Re:Ask HN: What editor do you use? by hs on Tuesday December 30, 2008 @02:04AM (#414026)
vim, for everything

ed, when i really have to

Re:Ask HN: What editor do you use? by mdolon on Tuesday December 30, 2008 @02:03AM (#414024)
Notepad++ on Windows, gedit on Linux
Re:Ask HN: What editor do you use? by KevBurnsJr on Tuesday December 30, 2008 @10:55PM (#415085)
Notepad++ is relatively customizable once you get the hang of it.

This editor handles HTML and JS in PHP files very well. However, I've yet to find an editor for Win XP that does a good job with ruby syntax highlighting in erb files.

Re:Ask HN: What editor do you use? by kzar on Tuesday December 30, 2008 @06:22AM (#414141)
Emacs here, just watch some of the screencasts that are floating about if you want to see what it can do.
Re:Ask HN: What editor do you use? by gaius on Tuesday December 30, 2008 @12:40AM (#413978)
Komodo (www.activestate.com)
Re:Ask HN: What editor do you use? by alanb on Tuesday December 30, 2008 @02:13PM (#414539)
The thing I like about Komodo is the graphical debugger which even works for threaded Python. As an editor, it is okay and has the useful feature that it's interface is very similar on Windows, Mac, and Linux (it's built using Mozilla's XUL).
Re:Ask HN: What editor do you use? by GrandMasterBirt on Tuesday December 30, 2008 @01:38AM (#414013)
It looks promising, I am going to try it out, see what features it has. Can you give any more description on what you like about it and what language you use it for?

EDIT: Maybe I am missing something, but this seems like a regular text editor with no nifty features like code outline. What does it actually give you over something like vim?

Re:Ask HN: What editor do you use? by bmj on Tuesday December 30, 2008 @09:38AM (#414235)
I used Komodo Edit on and off. It does have code completion in some languages (my experience is with Javascript). It also does code folding, among other things.

I found it to be generally useful, and the mixed mode syntax highlighting work well (actually, for my situation, it handled it better than any other editor). It isn't as fast as other editors, though. The project explorer can be particularly slow.

Re:Ask HN: What editor do you use? by joshsharp on Tuesday December 30, 2008 @02:46AM (#414055)
There is a paid Komodo IDE - I believe the free version is only a basic text editor.

I use Komodo for Python, but find it hit and miss. Still looking for something better.

Re:Ask HN: What editor do you use? by gaius on Tuesday December 30, 2008 @05:30AM (#414122)
There is a limit to what any editor can give you for any language that's not amenable to static analysis.
Re:Ask HN: What editor do you use? by talleyrand on Tuesday December 30, 2008 @07:33AM (#414167)
I use Geany which is very nice indeed. I use it for PHP and javascript. When I switched to Linux, I spent a long time looking for a replacement for my beloved PSPad and this was it. It has solid support for gvfs, good syntax highlighting, and a host of other features.
Re:Ask HN: What editor do you use? by quellhorst on Tuesday December 30, 2008 @10:19AM (#414270)
I recently switched to emacs from textmate/vim. I still use vim for small configuration files.

There is a recent peepcode on emacs and rails. http://peepcode.com

Re:Ask HN: What editor do you use? by hbien on Tuesday December 30, 2008 @04:22AM (#414097)
Vim, TextMate, and XCode.

XCode for Objective-C/Cocoa, I've tried using TextMate but XCode is just so damn easy to use for Cocoa projects.

Vim for lightweight stuff, like piping diffs into it for color or quick edits on servers.

TextMate for web development with Python/HTML/CSS/JS.

During college, I read PragProg and thought I should just stick to Vim for EVERYTHING, including command line key bindings. That changed real quick after doing work outside of classes.

Re:Ask HN: What editor do you use? by epicurus on Tuesday December 30, 2008 @04:27AM (#414098)
As I'm only half a hacker and hate learning arbitrary stuff, I use nano.

I think the next leap forward with text-editors is when we get some sort of interface with our eyes, or more importantly, our brain and the computer. There was an link on HN a few weeks or so ago showing they could distinguish letters from brain patterns. Surely this will make learning those vim/emacs commands obsolete. I will just bide my time.

Re:Ask HN: What editor do you use? by nreece on Tuesday December 30, 2008 @12:27AM (#413967)
Notepad2 (http://www.flos-freeware.ch/notepad2.html) and Visual Studio .NET 2008
Re:Ask HN: What editor do you use? by rantfoil on Tuesday December 30, 2008 @04:04AM (#414088)
Textmate is absolutely essential for Ruby on Rails / Ruby development. What I realize now is that it's a scriptable text editor that integrates super well with everything you want to do with Rails. Basically anything you'd like to do with Rails, someone's written a bundle for it.

This is particularly useful for testing using RSpec/Cucumber or your favorite testing libs.

Re:Ask HN: What editor do you use? by randallsquared on Tuesday December 30, 2008 @09:03AM (#414211)
Smultron (on OS X) for GUI editing, where I typically want a bunch of files open and their names visible at all times, and vim on the command line. On the Mac, one nice thing is that most editors and (S)FTP clients support the ODB Editor Suite, which means that such an editor and transfer agent can work together seamlessly as though they're part of an IDE.
Re:Ask HN: What editor do you use? by macco on Tuesday December 30, 2008 @05:03AM (#414112)
I use gedit with a lot of plugins for all of my programming. I mainly programm in Python. Only exception is when I play around with lisp, then I use Able. Other interesting editors for linux that I know are Scribes (very well planed and writen, with a unique concept, but only one developer, so development is slow) and Komodo-Edit.
Re:Ask HN: What editor do you use? by dmpayton on Tuesday December 30, 2008 @04:09AM (#414090)
On my machine I use Komodo Edit; when I'm editing a file server-side I usually use nano. ducks
Re:Ask HN: What editor do you use? by Shamiq on Tuesday December 30, 2008 @11:11AM (#414318)
when I'm editing a file server-side I usually use nano.

I did that yesterday -- my sysadmin flipped.

Re:Ask HN: What editor do you use? by sm13 on Tuesday December 30, 2008 @08:42PM (#414956)
Eclipse for PHP projects.

PSPad (a very nice and free editor) for Python PHP and general quick and dirty editing.

FlashDevelop for ActionScript. This last one was truly a happy find, with all the VS look and feel and a very comprehensive toolset, again for free.

Re:Ask HN: What editor do you use? by iamelgringo on Tuesday December 30, 2008 @07:52AM (#414179)
e text editor on XP. For a decent command line, I use Powershell inside of Console2 and iPython.

If someone wanted to make a lot of money, they'd create a better wrapper for cmd.exe or Powershell.

Re:Ask HN: What editor do you use? by graemep on Tuesday December 30, 2008 @02:31AM (#414045)
Kate and Geany, depending on whether I want the better editor, or need an IDE, and Quanta for HTML. Kate is very configurable and (like any KDE app) can open files over sftp which can be very handy.
Re:Ask HN: What editor do you use? by r11t on Tuesday December 30, 2008 @04:51PM (#414723)
I am suprised no one mentioned IPython? (http://ipython.scipy.org/moin/) IPython + vim is a nice combo for Python programming.
Re:Ask HN: What editor do you use? by olifante on Tuesday December 30, 2008 @07:55AM (#414182)
Currently using TextMate and enjoying it. Used many editors, but the ones I used the most were vi, vim, jEdit and emacs (ordered chronologically)
Re:Ask HN: What editor do you use? by merrick33 on Tuesday December 30, 2008 @02:59AM (#414064)
Coda now, used to use textmate but found textwrangler had better grep features and memory management when opening large files
Re:Ask HN: What editor do you use? by walesmd on Tuesday December 30, 2008 @02:31AM (#414044)
I use Intype for all of them - used to use Notepad++.
Re:Ask HN: What editor do you use? by tolmasky on Tuesday December 30, 2008 @02:04AM (#414025)
Re:Ask HN: What editor do you use? by jamesbritt on Tuesday December 30, 2008 @10:55AM (#414306)
gvim
Re:Ask HN: What editor do you use? by GrandMasterBirt on Tuesday December 30, 2008 @01:40AM (#414015)
I tried the Netbeans Ruby editor... and wow the difference between that and anything for eclipse is major. Code completion is useful. It can figure out what class I am referring to pretty well. Ctrl+click works nicely to see the definition of a method (no matter where it is declared, and it finds them quite well, shows list of choices if it is unclear).

Definitely worth a try for ruby.

Re:Ask HN: What editor do you use? by drhowarddrfine on Tuesday December 30, 2008 @11:41AM (#414344)
An IDE is not an editor. Don't be confused.