views:

9105

answers:

13

Even though I have a robust and fast computer (Pentium Dual Core 2.0 with 2Gb RAM), I'm always searching for lightweight software to have on it, so it runs fast even when many apps are up and running simultaneously.

On the last few weeks I've been migrating gradually to Linux and want to install a free lightweight yet useful IDE to program on C++ and PHP. Sintax highlighting and code completition tips are must-haves.

So, I'd like to receive some suggestions from you, guys.

+13  A: 

gedit

  • Syntax highlighting
  • Fast, lightweight
  • Tabs
  • GUI
superjoe30
+17  A: 

emacs has been used by linux programmers for decades. It features syntax highlighting, it's fast, and there are a million tutorials out there you can find.

num1
A: 

any of the popular editors can be turned into an ide.

I use Vi on the console and have used various gui editors over the years. This doesn't just go for linux I use Crimson Editor on windows as a C/python/z80asm ide.

sparkes
+9  A: 

I bounce about between Mac, Windows and Ubuntu and while Emacs used to be my editor of choice, I'm finding that in my old age I prefer to something GUI-based (using command-line for the shell is still fine by me). My preferred editor is Komodo Edit, which the advantages of:

  • Being free (as in beer)
  • Available for Mac, Windows and Linux
  • Syntax highlighting for a boatload of languages, including C++ and PHP (I'm using it for Ruby, Python and PHP myself)
  • Code completion, even for classes I defined myself
  • Ability to "remote save" via FTP, SFTP or SCP
  • Support for organizing your files into projects
  • Tabs and other interface niceties

I'm not sure how lightweight it is, but it certainly feels snappier than Eclipse!

Joey deVilla
+5  A: 

Joey, I believe anything is lighter than Eclipse! :o)

Mario Marinato -br-
A: 

If you're going for very lightweight and switching to linux, I recommend installing DSL, or Damn Small Linux. It has Vim pre-installed which is an editor I've used for source code editing for quite a while. I'll admit it has a learning curve, but it's worth it as you'll be able to work very quickly.

Dsl: http://www.damnsmalllinux.org/
Vim Tutorial: http://jmcpherson.org/editing.html

num1
he asked only for a editor and not a linux distribution.
Hippo
+7  A: 

Vim (or Emacs varying on religion) will always be my first answer to this question, over any point-and-click IDE. As they write in The Pragmatic Programmer

Choose an editor, know it thoroughly, and use it for all editing tasks. [...] The editor will be an extension of your hand; the keys will sing as they slice their way through text and thought. That's our goal.

Make sure that the editor you choose is available on all platforms you use.

Vim is configurable, extensible, programmable and can be turned into an IDE with all the regular features. Lately I've been using Eclim to "bring Eclipse functionality to the Vim editor" (projects, better java support etc.) making it a complete platform with advanced IDE features.

mreggen
+15  A: 

If you are taking your time switching to linux, I'd switch to emacs or vim at some point as well. There will always be a resource or a document describing exactly the problem you are having with either of them, and generally a solution is just a few more clicks down the road.

Emacs may be easier at the beginning because of modeless editing... but don't let modal editing scare you away from Vim.

The key with either Vim or Emacs is knowing it could probably take you the better part of the day just to figure out what you want them to do, let alone how to get them to do that.

Once they work for you though, you'll see why mostly everyone is in one of two camps.

General hints:

  • Setting up a Makefile for your project is almost always worth it.
  • Using cscope and or ctags will make your life easier.

Vim hints:

  • :make
  • :cn, :cp
  • OmniCompletion
  • using BufRead autoloads to set what :make should do depending on file type

Emacs hints:

  • ecb is fun
  • M-x dired
  • M-. M-, M-* M-x complete-tag for etags
  • M-x compile
  • (add-hook 'mylanguage-mode-hook '(lambda () (setq my-customizations t)))

And check out other people's customizations for examples of what other people do.

codemac
+1  A: 

I'm not sure exactly what you mean by 'lightweight,' but here are a few popular IDEs for linux:

Anjuta for Gtk/Gnome
KDevelop or Quanta for KDE
CodeBlocks runs on Windows/Mac/Linux and is written in C++

None one of these are Java, so they automatically have an edge over Eclipse for performance ;)

Another option is MonoDevelop, which is geared towards .Net/Gtk# programming but also includes C++ support.

Adam Lassek
+11  A: 

Console editors, such as emacs and vi, are more lightweight than their GUI counterparts, and (at least those two are) just as capable as any other IDE (syntax highlighting, mouse support, ctags, autocompletion ... all the way to gdb integration). The learning curve might be somewhat steep, and you might have to do some customization, but its all worth it. Also, vi is present on every installation of unix-like operating system.

Amongst X applications, there are

  • gedit which comes with GNOME and has many of these IDE features (see, for example, this blog entry),

  • Geany - really fast, depends only on GTK, and with even more features including code folding.

These would be lightweight IDEs, as opposed to heavyweights like Anjuta, KDevelop, Eclipse or NetBeans.

Zoran Loncarevic
+1 for Geany, i used it too
dkson
A: 

This is a really religious question - just choose the one you like. Every editor has it's pros/cons and you need to decide which set suits best to you. There are many IDEs out there that can use various editors like Pida.

unexist
+2  A: 

How has no one mentioned Code::Blocks!

Not only is it a fantastic Open Source IDE for C++, but it's fully cross platform, so if you need to work on a Windows or Mac box for a bit, you can use the exact same IDE, and exact same project files to do so! Which is great for cross-compiling!

Adam
A: 

what about eclipse with linuxtools?

teZeriusz