43 points · by eob · 16y ago · 138 comments
I've used Emacs in the past, but something about the way in which you can navigate code just makes me feel less than efficient in it. Maybe I didn't take enough time to memorize all the required shortcuts. Mastering an editor that can be used over an ssh session certainly seems a plus.
So a question to all the coders out there: what editor do you use? Why did you choose it? What are the downsides?
So I decided to pick an editor that I could stay with for a long time, maybe forever, because it did so many things and was so configurable. It had to run on my Mac at home, the Windows nd Unix machines at work, and also on the console. It came down to Emacs or Vim. My boss was an Emacs guy, and could do wonderful things with it. But I'd had a few RSS problems, and I'd read about what Emacs did to some users' hands. So I went with Vim, and I'm very happy with it.
Really, the only downside is that I don't have Vim everywhere, so when I'm stuck somewhere that doesn't have it my hands do the wrong thing. (Like in our crappy email system. I write long messages in Vim and paste them in, but I do short ones in the mail client. And hit escape when I'm done. And then hit cancel to say that I'm not abandoning the message.)
As far as I know, the only editor more configurable than Vim is Emacs. But Vim does do a lot. I use it for Ruby, shell scripts, HTML, CSS, XML, Perl, prose, looking around in log files, and more. It handles long files easily. You can script it with its built-in language (not as powerful as ELisp, of course) or other scripting languages.
I sometimes meet people who don't know the difference between Vi and Vim. When I say I use Vim they ask how I can get by with such a limited editor that won't split windows and doesn't have tabs and so on. So when I say Vim, I mean Vim 7.2, available at vim.org.
But Emacs and other tools are worth getting familiar with as well. It's good to not be too provincial.
For most of the time it works like the best of both worlds, but it's not perfect . You can't use viper-mode in every mode and it's obviously not full vi(m) emulation. Installing the vimpulse.el script (google it) adds a lot of missing vim functionality though.
It's also just much lighter and goes with my preference of using the simplest tool that does the job.
I use it because it is simple, it gets the job done, and I don't find that I need anything more.
It's true it's missing a couple of features commonly found in code editors. But when I start thinking code folding would be useful, I take it as a sign that this file is getting too large and would be better split. Nano also obeys the simple UI principle of having a non-modal interface. I haven't used an editor with bells and whistles for some years, and I'm liking it.
Also contrary to popular belief, nano does support syntax highlighting - this just isn't enabled by default in most distros.
Now, laugh.
Well, I'll admit that was... unexpected, but I am certainly not going to laugh. After all, the best code editor is the one you feel most productive in, and you seem to have a rational explanation for it so sure, knock yourself out :-)
Did not know this! FYI, a bit of googling uncovered the following: http://code.google.com/p/nanosyntax/source/browse/trunk/synt...
If Vim wasn't always available when Nano was, I'd still use it. ;^)
I'll open the Emacs lobby with http://sites.google.com/site/steveyegge2/effective-emacs and http://sites.google.com/site/steveyegge2/the-emacs-problem
To give the illusion of fairness, here is a blogpost in which I praise Vim: http://zipwith.blogspot.com/2010/05/power-of-vim.html
not the fifty thousandth time.
Well anyway, it worked for me. I have no trouble switching between the 3 editing modes while I program, edit configs and write email (thunderbird for now).
this makes me wondering the limit of human interfaces. how far can we transform into cyborgs through just "practicing"?
Visual Studio 2010 at home and 2008 at work. We're primarily .NET so the two just kind of go hand in hand. I'm also spoiled by intellisense.
I also use Eclipse at work since we've been doing a lot with GWT on the client side (thought still using .NET on the backend).
Finally, I'll often use notepad++ for anything JavaScript simply because it takes far too long to load up VS when I want to do something small/edit a file/etc.
I used to run Resharper when I used Visual Studio 2005, but with 2008 there's much less need for it.
Anyone knows of a simple way of getting that?
It also has vi-style regex searches, and it also highlights matches in that search mode.
Emacs has many ways of highlighting search terms: http://stackoverflow.com/questions/385661/emacs-highlight-al...
The only thing I do not like about vim is that auto-indentation and syntax highlighting feel a bit "shaky". I find many of the editors mentioned here more consistent in that regard.
vi I use to write my code for work,
It's modal and quite light, so quick to type
I'm glad to use it for the great big perk
That it lives up quite nicely to its hype
But emacs I do not so choose for me,
I fear the chords would sorely hurt my hands
And carpal tunnel is so bad you see
That misery makes it for me be banned.
I know this is not good according to
The cult of emacs users that I find
Would tell me to not speak until I knew
Why theirs was the best editor for mind
But I cannot agree with them and so
vi I use and now will say no mo!The main good thing about vi is that it's ubiquitous. You really should know how to use it, at least cursorily.
You can certainly use emacs over ssh (and you know about ssh's X11 forwarding, which let's you run a remote pointy-clicky editor rendered locally?).
Depending on your network and the files you're playing with, sshfs might be a relevant tool to view the files "locally".
If the files are really big, man the "split" command.
I use Inconsolata font at 14pt and a modified Monokai theme (with darker background) whenever possible.
About once a year or so I decide I'm going to switch to vim. I spend about a week getting my vimrc and plugins set up and use it for a couple more weeks, before I eventually get sick of keyboard navigation and NERDTree and go back to TextMate. I know that with MacVim I get things like scrollwheel support and mouse navigation, but if I'm using those anyway I might as well use them in TextMate and get back my tab triggers and other shortcuts.
It's always good to brush up on vim once in a while though, since it often comes in handy when you need to edit config files on a server or when you are collaborating with a developer who uses vim exclusively. I also wish TextMate had split panes and some of the keyboard shortcuts (o, O, I, and A come to mind), but overall my productivity is better with TextMate.
Have you ever tried IDO, http://www.emacswiki.org/emacs/InteractivelyDoThings?
And that's the worst case. If I want to see the definition of some function that the point is currently near, I just press M-. to visit it. And M-* to pop back to where I was before.
Some of my can't-do-without features are: delete line, duplicate line, shift-line (up/down), select word, multi-edit (on gedit), word complete (circle through options bash style) and snippets. If I had to pick between gedit and TextMate, I'd probably go with gedit, but only because I spend a lot more time on it on a daily basis. I'm sure if I had TM at work, I'd probably understand what all the hype is about.. :)
Currently I'm using Visual Studio for all .NET related things, because it's a nice, overall IDE.
I'm also getting into C++, for which I use vim in Ubuntu (although I am far, far from being a decent vim user). I couldn't stand the way it tried to handle everything by default and felt like it was interfering with my understanding of C++ dev. I also didn't like the way the VS solution layout doesn't match the disk layout. I wanted to get more down and dirty with my compiler, and possibly learn make.
I also interchangably use Notepad++, Textmate and e-texteditor depending on what's available on the machine I'm on.
Currently at work, it's eclipse for Java development, and Textpad for all quick editing, regular expressions, mass find/replace across files, large files, etc.
The vim bindings are good. The app is OS X is fine. (Though I had to hack the source to make the "Go To file" not look in the history, which was bothering me with my many branches). Also removed anti-aliasing, which is awful for code IMHO.
It crashes from time to time, but I think it's the best all around choice right now for good vi bindings, sensible auto-completion, multi-language support, etc.
Plus I like that it's cross-browser and open source, in case I ever want to leave OS X for something better.
http://www.ultraedit.com/products/ultraedit.html
If you work with large files a lot, you may want to check this out:
http://www.ultraedit.com/support/tutorials_power_tips/ultrae...
I also LOVE the scripting. I've written a lot of custom scripts to automate repetitive tasks.
The only downside, it's not free like many of the other editors listed here; however, it is well worth the money.
Color me crazy but the majority of "fancy" stuff that most IDE's have is counter productive. Unfortunately i'm still a newb at VI and emacs to truly appreciate either.
Decent editing functionality, syntax highlighting, the concept of opening a project directory (which gEdit doesn't do well), and open file by pattern match is 95% of my use cases.
Or you could try something called Red Car Editor (http://redcareditor.com) which proclaims to be an editor specially made for ruby/rails programmers. It looks pretty impressive, but again I couldn't get it installed properly. (I think the latest version runs on jRuby platform)
EDIT: I got inspired to try Red Car again after posting this comment. Uninstalled Ruby completely from Windows 7, installed jRUby 1.5. Red car gem installation went perfectly, but the editor is shockingly slow and unresponsive. I don't know if the same applies to linux platform, or if there is something wrong with my system (its a 2 year old laptop, and its been a long while since I have reinstalled the Windows OS)
Worst part about using VS2008 is the intellisense for JavaScript, it's so bad it is actually a slight annoyance. Supposedly the JavaScript intellisense for Visual Studio 2010 is a lot better.
On OSX I use TextMate, but on Windows I use Intype -- www.intype.info
Intype is a very, very useful text editor similar to TextMate in that it supports three key points:
1. Bundles / snippets 2. Intelligent selections and editing (multiple, rectangle, etc.) 3. Fuzzy search in quick open
Anyone using TextMate knows how important bundles are to one's work flow.
By far the biggest downside of Intype is its pace of development. It's incredibly slow and right now the best version they have is an 'unstable' release: http://intype.info/download/download.php?intype-0.3.1.734.ex...
It's still a very basic editor. As such, they're looking really good project management tools, file watching (refresh on external changes), integration with source control systems, etc.
They have been working on 0.3.5 for such a long time and I doubt we'll see a release of it before the end of the year. Nonetheless, the upsides outdo the downsides by far for me personally.
things i love: non-modal interface (used vim in college, found myself frequently cursing its modes: "do what i think, not what i type!"); lives on every system i work on; does not require smelling salts after encounters with large files; insanely flexible and powerful
things i hate: insanely flexible and powerful (i.e., large investment required to capitalize on flexibility and power); i'm not a pianist (abundance of control and alt prefixes to key commands make rachmaninov cry from his grave); this is 2010 -- where is my anti-aliasing, dammit; after a year, i still have regular arguments with tabs/spaces/indentation
to address your concern about navigating code efficiently, i sympathize. i felt that way when i started out (even after realizing i could select text with my mouse), but i'm in a phase where i spend more time thinking about writing code than actually writing it, so i worry less about how fast i can copy and paste an awkward selection from one file to another than i do about how well my editor fits with my work environment and personal habits.
Clearly, you should end your files with ".py".
> navigating code efficiently
Use xcscope, if your language is supported. Obvious, and you've probably tried it (and now, probably don't care), but worth mention, for others at least.
Since I bought it, they've added code folding, which is really nice. It's really just a plain jane text editor with pluggable syntax highlighting. The ability to save to a remote server is really nice, too, especially if you're doing remote dev work. I just wish it had SFTP support instead of just FTP. Or SCP. Whatever. Something more secure.
It's incredibly fast and lightweight, and I've never felt a need to use anything else.
I've also been known to use jEdit, nedit, and vim, depending on what type of environment I'm working in/through.
http://en.wikipedia.org/wiki/Coda_(web_development_software)...
Downsides? It's Windows only.
This looks like a great editor. It's proprietary, though. Damn.
Why is it that, as with Opera, every now and then you find an amazing program which, even more amazingly, is closed-source?
Emacs, however, offers minimap as well: http://www.emacswiki.org/emacs/MiniMap
I wonder how well we did compared to Sublime.
You guys have it too.
Downsides.. IDE-ification of development. Slow startup time (wants SSD hybrid drive for this). Synchronizing plugin versions can be a pain in the ass. Fairly steep learning curve to advanced features.
These days while on Windows I often have gVim, Sublimetext and Texpad open simultaneously. The minimap is cute, but have never found it useful, still Sublime is almost as snappy as TP.
Any Lisp: Gambit-C Scheme, Clojure, Common Lisp: Emacs with either Slime or custom support. (I also like the IntelliJ support for Clojure.)
Ruby: mostly TextMate or GEdit, sometimes RubyMine.
Java, Scala: IntelliJ. Nothing else even comes close.
Latex: TeXShop on the mac, GEdit on Linux
I usually use EditPlus for my notepad replacement as well as any regex functions or searches I need to do.
For any system-based programming, I do everything in Eclipse because it automatically interfaces with my SVN and deploy servers.
Otherwise I'm using Vim exclusively, and hope to someday be pretty good with it. ;^)
When I was on Windows I used EditPlus and still advocate it for Windows users. Fast, capable, customizable, and the developer was always very responsive to my questions and requests.
WingIDE hands down if its just python or a ton of python. Emacs for servers and CygWin.
For editing code I use e. It's great. It does hang on large files, however.
I spend the vast majority of my time inside of the iPython command line, and when I finally work out what I'm trying to do, copying the result back in to the text file in e.
TextWrangler/BBEdit, for most other files. I like the built in support for sftp, so I can work remotely in a gui.
For the quick edits from the command line I use the old standby, vi.
i really want to give jetbrains my money but they haven't put out anything for me...yet :)
O ye'll tak' the high road and I'll tak' the low road
And I'll be a editin afore ye
For me and my emacsen will ne'er wont to gae
On the Vim Vimmy scriptin o' productivitin'I'd love to hear more about how the projects have 1) a lot of files or 2) really big files... and how you navigate around the proj. should the really big files be broken into smaller files? etc...
I don't understand all the love for Visual Studio. Everyone I met a few years back at Microsoft ignored it and used gvim and their own make clone, in spite of devdiv's pleas for feedback.
I used to use different editor for every language but I am getting more and more comfy with gedit.
Easy to use, and no holy wars.
on linux, i use nano.