Hacker News new | comments | show | ask | jobs | submit login
Ask HN: If you have access to an IDE, why would anyone use a text editor?
9 points by kamehameha 3156 days ago | hide | past | web | favorite | 24 comments
What's the rationale behind text editors like emacs/vim vs IDEs like IntelliJ/Eclipse/Netbeans?

I mean if you have access to an IDE, why would anyone use a text editor?

If there's a really obvious answer, please excuse my ignorance. Just started reading up on programming.

P.S. Also, can one use IntelliJ for python and ruby in addition to JAVA?




I can't speak for all emacs users, but I wouldn't be caught dead using an "IDE"

IDE ostensibly stands for "integrated development environment." AFAIK, not a single IDE is as integrated, programmable, hackable, flexible, or stable as emacs (or vim).

In Emacs, I can effortlessly open and navigate through an indefinitely large number of files. I can take advantage of myriads of language-specific modes for syntax highlighting, auto-completion, snippets, verification, prettification, truly integrated compiler/interpreter environments, you name it.

If I find I need to do some repetitious gruntwork, I can C-x ( gruntwork C-x ) it away. If this gruntwork seems excessive, I can program it into my editor and forget about it. If I find I really need some feature or functionality, I can pop open a scratch buffer, hack it, and use it instantly. No boilerplate, no compiling, no restarting.

These are just the tip of the iceberg, though. The overwhelming sense an emacs or vim user experiences, is one of power. We have complete control over our programming environment. We dictate it, hack it, and tweak it until it is effortless. This sense of power and hackability so permeates our programming environment, that it becomes physically painful to have to navigate a swarm of inconsistent modal dialogues, accept some kludges and pray they get fixed, and accept that The Developers know how best to configure our environment.


I think it would be a worthwhile project to get some of the top emacs/vim users doing a set task (e.g. spit out a rails app, or build a small java app) and compare them to the gold standard ide in a guided screencast setting.

It would be enlightening for the wider programming community to see some stats about how fast each truly is. Obviously approaches could be streamlined, and best practice could be learned by beginners from the get-go.


This is a really interesting idea.

Top emacs/vi users : please list your favourite shortcuts.


I always thought emacs was an IDE - it can read your email and a whole bunch of other non-editor functions.


I mean if you have access to an IDE, why would anyone use a text editor?

But, why would I use an IDE if I have access to a proper text editor like vim or emacs (I use vim, but I've used emacs enough to know I could be productive in it if vim didn't exist)? Your question makes no sense to me.

I've known a (very) few people who are productive in IDEs, but generally speaking, the best developers I've known use either vim or emacs. I've never experienced an IDE that didn't make me angry, so I've never spent any significant time with one, so I don't know what the valid arguments for using them are, though I'm sure there are some.

I'm curious about the framing of your question. What is the rationale behind your question? When you use a big IDE do you feel more productive? Do you just want to avoid learning how to use vim or emacs? What are you trying to achieve here that brings up this question? Do you think an IDE will make learning to program easier?

One of the reasons I've never used an IDE heavily is because I find them very difficult to use and understand. They pile together a bunch of different concepts under one roof, and assume that it fits the work I'm doing. It pretty much never does, so I would just be using it as a big slow editor anyway. The other reason is that whenever I've wanted something IDE-like (like completion, or highlighting and indenting for various syntax, etc.), I've easily found a plugin for vim to do the same job without all the extra baggage.

The answer is generally that IDEs are big, slow, cumbersome and distract from the software you're building. If you're working in a language where the assistive tools are a core part of the experience (Java and C# seem to fall into this category), then maybe you should use those tools. I work in dynamic languages, and big slow editors just get in my way, slow me down, and fight against my own toolchain and workflow (which includes shell scripts, the shell itself, the ability to open and edit files from anywhere, including in-place on the server).


I'm curious about the framing of your question. What is the rationale behind your question? When you use a big IDE do you feel more productive? Do you just want to avoid learning how to use vim or emacs? What are you trying to achieve here that brings up this question? Do you think an IDE will make learning to program easier?

I am not a programmer. I have recently started to learn programming. I was reading up on mediums to write programs in (text editors vs IDEs) and came across all the features provided in IDEs. Which was when I became curious as to why I see a lot more chatter about text editors like vim/emacs instead of the other way around. That's all.

Again, I'm a beginner, so just trying learn the ins and outs. Thanks for your help.


came across all the features provided in IDEs

Maybe merely having a lot of features is not necessarily the most valuable thing when writing software. I suspect most truly great developers (I'm not one of those, but I've worked in the field long enough to know them when I see them work) just want the tools to get the hell out of their way. Stability, speed, predictability, consistency, generality; those are probably the most important features for a great developer. I like those features, too, and it's why I use vim.

Also note that I use vim for everything. I don't have to context switch when I go from Perl, to Python, to C, to bash, to sh, to configuration files, to HTML, to CSS, to JavaScript, to RPM spec files, to deb control/rules files, etc. It's always the same in vim (and vim has syntax highlighting for all of them). This is where generality has value. I don't have to think about how to copy/paste, how to find the end of a block, or how to perform a search/replace across the whole file or just a segment of it. It's always the same.

The greatest Java IDE in the world, whatever that is, is definitely not the right tool for editing files on a remote server. So, I would have to switch mental modes to use it. That would slow me down. I can use vim or emacs for that, no problem.

And, of course, as I mentioned, there is probably no feature in any IDE for which there isn't a parallel in vim or emacs. It is probably optional, it is probably not pretty, and it probably requires you to learn some new key sequences. But, it almost certainly exists, whatever it is. But, after spending a few years with a good editor, you'll probably find that simpler but more general solutions are superior to special purpose tools.

Which was when I became curious as to why I see a lot more chatter about text editors like vim/emacs instead of the other way around.

Age has it privileges. emacs and vi have been around for a long time. Assuming something is good and continues to get better, the longer it exists, the more users it will have. emacs and vi (in the form of vim) are both excellent and continue to get better. Thus they have a very large, very dedicated following. Which leads to faster improvement (though in directions that might not be immediately apparent if big IDE-style feature lists are what you think of as "improvement"), more third party tools and support, and more docs and examples.

You'll never hear any long-time practicioner of software development or systems management say that learning one of the two major editors is a waste of time. Knowing vim or emacs will very likely serve you well for the rest of your career. Knowing an IDE might make working in one language in one environment a little bit more awesome for year or two or three that you work in that language in that environment.


IDEs are big, slow, rigid. Text editors are lightweight and fast. You'd have to weigh what you get from the IDE vs. what you're giving up.

As for your other question, yes, there are ruby and python plugins for IntelliJ. The python one seems new and immature. The ruby one should be better. They (Jetbrains) actually just came out with a standalone Ruby IDE as well. I think it's meant for people not already using IntelliJ, because it wouldn't be worth paying for both products since the Ruby plugin works well enough.


My usual development environment for is a Macbook Pro with six terminal windows open. The first one (Command-1 shortcut key) is a connection to the database, the second (command-2) is Vim with program code, the third (command-3) is library code or test scripts or whatever and the next three (smaller, with blue backgrounds) might be showing tail -f of Apache error or access logs or something like that. If I need to edit an image I command-tab to the GIMP, to view a web page, command-tab to Firefox or whatever. I can connect those windows to one or more remote boxes with ssh and not even have to think about what machine I'm working on. It's easy to reuse those windows for other things, close one with command-w or open new ones with command-n. Vim does syntax highlighting and will even auto-complete if I wanted to turn it on.

What would an IDE give me that this setup won't? To me, the setup I use IS an integrated development environment.

I have used Visual Studio, XCode, Eclipse, etc. but whenever I do I feel slow and inhibited because of the necessity of mouse movements (unless I want to learn a completely different set of key shortcuts that will only work in the IDE and not the OS) and the annoying tendency of IDEs to reformat my code or complete blocks I'm not ready to complete.

Also, OS X and Ubuntu both allow great control over terminal window transparencies and color schemes. I'm not aware of any other IDE that does. I like to keep my main editing windows at 70-80% transparent so I can watch logfiles/test scripts run in the background while I'm editing.


I use a text editor (like vim) because it's so much faster than an IDE (like eclipse). If you use keyboard shortcuts and work quickly, you'll quickly find that the IDE slows you down considerably.

Also, I find that IDEs hide a lot of the inner workings from you. That can be convenient, but when you run into troubles during a build or when debugging, I'd rather have more control, more details, and a better idea of what's going on.


I use a text editor for all of my hacking needs (vim but emacs is good times too). That being said I'm amazed the HN community has so much trouble understanding the usability. Do you feel similarly when you load up into the latest Rate My Startup: "Wow this interface is really just holding me back, I'm completely stifled by all these buttons all over the place.This interface should just be a blinking cursor" Of course you don't, feature discoverability is an important feature that designers strive for. When you're competent at programming and you really know your editor then you boot up and you know exactly which feature you want to use and the shortcut to do it, but it's almost impossible in vim/emacs to learn these features on the fly. In my opinion IDE's can be a great way to learn to program particularly one's designed with a particular language in mind. The best example of this I've seen is DrScheme which is lightweight, intuitive and (believe it or not) does by and large stay out of your way.


IDEs baby new programmers in such a way that they will become crutches. Text editors (in theory) only modify the source code. All compilation and backend work is done by the programmer with external tools. IDEs will usually hide that work away in some button or drop down menu, so the new programmer will be less inclined to learn how everything is run.

When I learned java, I broke away from the IDE I was given to use in class and switched to a text editor. I read about command line tools and what a classpath is. I doubt that I would have known about how programming works behind-the-scenes if I hadn't broken away. Many (not all) of my classmates haven't; they rely on the almighty 'Compile' button, don't question it, and won't bother to learn otherwise.


Because Unix IS an IDE already, with text editors like emacs or vim fitting in nicely with scripting, make, etc, etc.


I consider the Unix command line to be my IDE too (I'm mostly a vim user).

Just last night my plane was delayed due to heavy storms in Europe and as other peoples heavy laptops were running out of juice I still had hours left on my netbook. The command line is a great environment on low power hardware, it doesn't need a mouse and you don't have to wait for IDE support to start working with a new or obscure technology.

That said, I still feel I need netbeans/jvi to do anything with Java -- personally I feel this is due to shortcomings with the language rather than a problem with the way I normally work. In fact, I recently started playing with Scala and, since netbeans didn't really add anything useful, I was able to go back to vim. I feel much more productive in Scala/vim than I ever was in Java/netbeans.


And here we have another battle:

Console or GUI?

The only really good developer I know who prefers Visual Studio to Emacs is the one who prefers TortoiseSVN to svn.exe and just dislikes command line.

However, there are two extremely good reasons to use command line (and emacs/vim):

1. You're typing text when coding or debugging, and going back and forth with mouse is counterproductive and frankly, really irritating.

2. You can automate text-based controller much more easier than a GUI-based one.


I think the line between an IDE and a text editor is not that clear and instead there is a spectrum of editing. At one end you might find Leafpad (aimed at simple text editing) at the other end something like IntelliJ. IntelliJ provides more code tools than Leafpad, but is more heavyweight.

So the question comes down to how many code tools do you need. If an editor has too many then it might feel slow, too few and it might be less effective.

Many editing environments have a plugin style extension mechanism so that you can add new tools to it if you need them, or remove them if it feels too heavyweight.

A key difference between say emacs and IntelliJ is that IntelliJ has more specific tools loaded by default (e.g. Java focused). Perhaps not the ones you want, but you don't have to go to all the effort of finding them, loading them and they all fit together well - of course there is a cost that goes with those tools: increased CPU / memory.

When choosing one of these pieces of software it might be useful to look at the range and power of plugins that are available, however, that's not an inherent difference between IDE and editor.


When I'm on laptop battery I switch to "LispIDE", which despite the name is an ultra-lightweight Lisp text editor for Windows. It has the absolute bare minimum; runs a lisp process, highlights syntax, indents code, and is able to evaluate code in the editor buffer.

I get so much done in the 2-3 hours I'm at the coffee shop, I also take copious notes in notepad, by the time I come back home I can fire up Emacs and cut and paste tiny little independently developed routines and classes, and orchestrate them to a good chunky module.

I only wish I could get more mileage out of this little brain of mine for more than 4 hours a day. I have to stimulate myself with hackish sub-projects and chase "performance" red-herrings just to keep going.


load time on a text editor is much faster.

if you know exactly what you want to do, but still are doing things in code, popping open a file in a good text editor is superior.

if you're looking to open up an IDE and sit down for a few hours' work, then that is probably the better choice.


Sometimes I just have to make a small link change or replace a word. Text editor opens up fast and just gets the job done.


exactly.

or, stuff like config file editing. why would i ever open up an IDE for that?


In general, I tend to prefer using a text editor over most IDEs, which are usually big and fat and slow, with poor usability. IntelliJ - for me - has always been an exception. I can't comment on the Ruby or Python plugins for IntelliJ; however, the Clojure and (my) Arc plugin work just fine. I find working with them preferable to SLIME or TextMate or whatever else.


vi and emacs (I prefer emacs) are consistent and have been around for years. IDEs come and go with passing of languages, trends, etc. With vi/emacs you have consistency and a bug-free editor.

As a side note: I once saw UltraEdit eat a text file my co-worker was editing; once saved as UTF-8 it blew the file away and crashed. Another reason not to use closed-source junk.


[Cue the "all real programmers use vim/emacs/etc" comments.]

I've used both. I like both. If you're new, I'd start with an IDE and lots of online, context-sensitive help.

And an easy language.

Once you get your feet wet writing a few apps, keep challenging yourself by moving to more complex languages and less-visual environments.


I use Acme and Plan 9 from Bell Labs, a text editing tool, I edit text. I don't need something to do the programming for me. Acme's ability to run commands by clicking on text is more productive than you're giving it credit for right now. Want another menu item? Just type it into the menu bar! Use a bunch of commands on one file regularly? keep them in the comments. Want to pattern match text snippets and execute commands, no problem it's built in to userland.

I won't call it an IDE because it knows nothing about the types of text you're editing, doesn't do syntax highlighting but it can run a shell in a window, and an HTML renderer and has an email client and a wiki editor and and and




Guidelines | FAQ | Support | API | Security | Lists | Bookmarklet | DMCA | Apply to YC | Contact

Search: