+11  A: 

Text editors just edit files.

Compilers just compile files.

IDE's just bring files and the compiler together in a convenient way.

So... No, you don't need to copy/paste the code into an IDE, however you do have to make sure your compiler (IDE in your case) knows where to find the file you want to compile.

John Weldon
what do you mean by "downvote coward"?
Gregory Pakosz
Someone downvoted my answer with out explaining what was wrong with it... :)
John Weldon
+1 for being third on the page but first that actually answers the question
BlueRaja - Danny Pflughoeft
+16  A: 

Well you edit your files in emacs or vim. Then you save them and then you invoke the target language compiler.

Typically, C projects would use Makefiles that are meant to track down the files needed to be compiled into a program, and their dependencies. Then you typically type make in the command line and make reads the Makefile you authored and takes care of invoking the compiler on the files etc...

For Java, people often use Ant or Maven to build their software.

...I know that my answer is vague, the list of languages and build tools is long, you should narrow down your question.

Very often, under Linux, when I don't need a massive IDE, I'm using Pida. It brings me a list view of the different Vim buffers, a convenient treeview of the filesystem and a shell: see screenshot.

See:

Gregory Pakosz
and you can invoke Make from vim and emacs if you like. It's just like s*x, there are many possibilites :p
Gregory Pakosz
Emacs is like sex? I guess I overlooked that lisp package.
Adam Crossland
Emacs is certainly like sex - if you can't get access to someone else's package, just do it yourself.
Graeme Perrow
This is a good answer, and is how I coded/compiled for android to avoid using a big IDE like eclipse.
Jason
+1  A: 

In VIM (with no extensions installed) something like

! /path/to/make (C/C++ world)
or
! /path/to/ant build (Java world)
DrewM
+1  A: 

It depends on your compiler, platform, and program. Most, like gcc, can be called from the command line (or from within either of those editors) although you may have to first write a makefile for the linker. Other compilers are integrated into IDEs (or are difficult to control externally), although even these won't require copy/pasting. Simply save your program and open it from within the IDE.

Asklepius M.D.
+5  A: 

You don't need an IDE to compile a program. You just need a compiler. Emacs/Vim are text editors that allow you to write your program. You then call the compiler and it will do the compilation.

Also, Emacs and Vim are scriptable and have routines that allow you to call a compiler directly on the file you're editing.

Noufal Ibrahim
+2  A: 

In vim, you type :make. In emacs, you type a M-x compile-frobnicate style command which I'm sure someone will provide.

Tobu
It's `M-x compile`, generally. No `frobnication` required.
Chris Conway
+3  A: 

Apart from what already has been said, take a few tutorials to learn how to code/compile with vim and Emacs:

Kornel Kisielewicz
A: 
Jason
:D ok so the OP's question read "Is there a way to integrate Vim as a text editor inside Visual Studio?"
Gregory Pakosz
This has nothing to do with the question..
BlueRaja - Danny Pflughoeft
Well I didn't downvote and I would say it's not fair to downvote @Jason. The answer may look off at first glance, yet it was accepted by the OP.
Gregory Pakosz
Irrelevant answer.
Pierre-Antoine LaFayette
Hey guys/gals, thanks for down votes. Guess telling the OP that he doesn't need to copy paste his code from VIM to an IDE (Visual Studio) is completely irrelevant.I'm sure he decided to accept the worst answer just for fun?@Papuccino - If you're on eclipse check out http://vimplugin.org . Never used it though, can't attest to it's quality.Btw, thanks @GregoryPakosz and @Papuccino :)
Jason
"Guess telling the OP that he doesn't need to copy paste his code..." But you didn't. The answer is, "No, you can compile from command line, or from vim/emacs, or open the code from an IDE without copying/pasting." Making VS work like vim has nothing to do with any of those things, and he would still copy/paste if he didn't know any better.
BlueRaja - Danny Pflughoeft
@BlueRaja - Yes you can do all those things(compile cmdline, open in ide).(I voted up @Gregory) However, if you are working on .NET platform you do not want to do that. I did it. For two years. I was simply trying to give a tip in case the OP or anyone else happens to be on .NET (a lot of people) and want to use vim.
Jason
Your link isn't right. You've got vieumu.com instead of viemu.com
Jay
Thanks @Jay, just fixed it
Jason
A: 

So far: IDE = a poor editor + compiler + debugger + other_unnecessary_stuffs Go get a compiler and a debugger and you do not need an IDE anymore

tungd
And multitasking. Writing programs in CP/M was a pain, having to get in and out of the editor while invoking the compiler, and sometimes the assembler and linker. Turbo Pascal was wonderful in that environment.
David Thornley
A: 

Many IDEs can detect if the source file is changed by an external program, and prompt you to reload. I know this is the case with MS Visual Studio and CodeWarrior.

This is useful if your project is already managed by the IDE and you don't want to move it to something like Make, for example if you're on a team who mostly use the IDE, but you want to use a different editor. Simply edit and save the file in vim or emacs, switch back to your editor and hit Compile.

Matt Curtis
A: 

No, you don't need an IDE to compile code that you write in emacs.

I use emacs very extensively for building .NET code in C#.

The .NET runtime includes compilers. I downloaded the .NET SDK, which includes other tools, like nmake, msbuild, XML tools, debuggers and so on.

I grabbed csharp-mode.el, which teaches emacs how to highlight and indent C# modules.

C-x C-e , for me, runs the command compile. I type in msbuild there, and emacs runs the build, using the .NET SDK tools.

I do something similar with C code, and with Java code, and with Javascript.

The same idea will work with other languages as well.

Cheeso