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
[ 280 ms ] story [ 2176 ms ] threadEDIT: 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?
I use Komodo for Python, but find it hit and miss. Still looking for something better.
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.
scribes is another one worth looking, but lack of tab support keeps me with gedit.
Wish it had a tabbed terminal, and code folding though.
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.
Definitely worth a try for ruby.
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.
ed, when i really have to
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.
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.
Yes, they are. I thought we were talking about text editors?
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.
Btw, emacs has an excellent mode for editing python and I couldn't live without its auto-indent feature
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.
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.
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.
This is particularly useful for testing using RSpec/Cucumber or your favorite testing libs.
I did that yesterday -- my sysadmin flipped.
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.
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.
If someone wanted to make a lot of money, they'd create a better wrapper for cmd.exe or Powershell.