Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Do you use VIM/Emacs/Terminals to develop C/C++? What kind of projects is this practical for?

For those who are using vim/emacs/terminals,etc (ie, not an IDE proper) what sort of projects are you working on? Are they big? Production? Are these the tools you use at work? Or mostly for smaller things...or big things broken into small things? Sorry...enough questions.

I ask because I'm studying computer science right now, and am super excited about it. I had an internship programming J2ME for a government agency recently and it was Netbeans and eclipse all the way. So I've only had a few "minor-league" years in the business.

In short, what is practical for the CL type tools, versus an IDE such as 'beans and VS. I've got a lot to learn, and the CL tools will probably teach me, versus shielding me like an full on IDE might.

like image 860
Jimbo Avatar asked Nov 15 '09 04:11

Jimbo


People also ask

Why do people use Vim over Emacs?

Emacs tends to be relatively straightforward, similar to commonly used text editors like Notepad. On the other hand, Vim is a power-user's tool, using keyboard shortcuts to speed up tasks. Vim is known to have a much steeper learning curve than Emacs.

Is Vim good for C?

It is said that vim is not suitable for C/C++, especially big C/C++ projects. and the best way to write C/C++ is to use an IDE like qt-creator , clion or vs.

What is Emacs good for?

Emacs is a text editing tool that comes out-of-the-box with Linux and macOS. As a (less popular) cousin of Vim, Emacs also offers powerful capabilities with easy-to-install language support, and can even help you navigate faster in macOS with the same keybindings.

Can you use Vim in Emacs?

But if you're already accustomed to the Vim key commands, you may be discouraged from learning a whole new set of Emacs commands. That's why a group of Vim users got together and ported Vim key commands over to Emacs. In order to use the Vim key commands you just need to install Emacs and install the “evil” major mode.


4 Answers

Twenty years ago all my programming was done in plain text editors, mostly emacs, but technology has improved over the years.

I still do use plain text editors to write code occasionally, but only when it is inconvenient to install an IDE on the machine where I'm writing code. For example, a few times I've stopped by a client site without my laptop and wanted to write a quick program.

This is also an issue with certain embedded systems, where you may want to update the code interactively through a RS232 or USB based command line interface.

Most modern IDEs provide enough acceleration to the code editing process that I will install one whenever I expect to use the computer for development for more than two or three hours.

like image 165
Ray Burns Avatar answered Oct 05 '22 02:10

Ray Burns


Hmm... Well, look at it this way:

I open code in emacs. I edit it. I use code completion (and I've even played with intellisense emacs)... When I'm ready to compile, I hit CTRL+F7... A key I've bound... It builds in a small popup window... If there are any errors, I can jump to them in the code by hitting f8 (another bound key)... Once it's all building, I hit f5... (this runs a little program I wrote that parses the Makefile and determines the path the executable)... This starts the debugger in a small popup window... I can click on code lines to set break points... etc... I debug... I can "next" through the code with F10... I can "step" through the code with F11 (more key bindings)... When it's all done I hit Shift-F7 to package (.rpm) the project.

So, do I have an IDE? Or am I just using a plain text editor?

like image 42
dicroce Avatar answered Oct 05 '22 02:10

dicroce


What sort of projects are you working on?

All kind... vim is my main "IDE" anywhere

Are they big?

Yes... My FOSS project CppCMS written almost 100% in vim

Production?

Yes, most of production code (Not FOSS) I write today I use vim.

Are these the tools you use at work?

Yes.

I would explain severak simple things:

  1. vim provides almost all tools IDE does, highlighting, spellcheck, autocomplition, working with multiple buffers, build, context "jumps" (decl, def) and much more
  2. It is extreamly portable, I work with it on Windows, Linux, OpenVMS, Solaris, FreeBSD.
  3. It is very light in comparison to bloated IDE.

There is only one thing I do use IDE today: debugging hard bugs.

like image 30
Artyom Avatar answered Oct 05 '22 03:10

Artyom


Emacs/Vim can be used for any sized projects.

Generally, you won't get to choose the environment, the job you find will have one already picked out for you (unless it's non-Java programming in Unix, in which case use what you want).

I wouldn't sweat the choice, just learn to use which ever editor/IDE is available to its utmost extent.

I use (and have used) Emacs for personal projects, and in two different companies on software projects exceeding 10M lines of production code each.

like image 44
Trey Jackson Avatar answered Oct 05 '22 01:10

Trey Jackson