views:

277

answers:

6

Hi,

I want an simple IDE/editor for C in Linux to which I can add features easily. For example: I want to add a right click menu item and a related action for the editor. It should be easy to extent and add any desirable functionality. I tried eclipse CDT but its to much of learning(I mean knowing the eclipse plug-in architecture and the CDT extension points and stuff) to do for the small modification/s I want to do.

Thanks, Sachin

+3  A: 

I personally use Code::Blocks, which according to their website also has a Linux ditribution. http://www.codeblocks.org/ I don't know whether it's very extendable, but it has all the features you'd expect from an IDE.

QuantumPete

QuantumPete
+2  A: 

Look at QDevelop - it`s quite simple but featured ide/editor for qt applications. 5 mins look at source files gives me a way to add a right click menu item :) Steps to reproduce:

  1. Download source, try to build - i had no problems with that
  2. Run, right click on some text in editor window - for instance there is a "Goto Implementation" item there
  3. That text is in src/textEdit.cpp file as:

    connect(menu->addAction(QIcon(":/treeview/images/cpp.png"), tr("Goto Implementation")), SIGNAL(triggered()), this, SLOT(slotGotoImplementation()) );

So, slotGotoImplementation() - is a func that will be called. Add your actions in a way like all other actions implemented there.

There are some information on a site about writing plugins to the editor - may be it`s a better way to extend features, but adding some pieces code to source seems easier.

+1  A: 

Look at codeblocks and how to write plugins for it. It is the simplest way to add new functionality to the current application. This should be a good starting point for doing a plugin for codeblocks.

Iulian Şerbănoiu
+2  A: 

I would try emacs (but the programming you have to do is in LISP. it is easy, when you get the knack with parantheses). you can do the programming depending on context of the buffer (.c other than .h) an it has a very big c-mode which has many of the most need things implemented already.

Example: insert if

;; the indention-thing needs refining
(defun pm-if ()
 "generates if stub"
 (interactive)
 (insert "if () {")
 (indent-according-to-mode)
 (newline)
 (indent-according-to-mode)
 (newline)
 (indent-according-to-mode)
 (insert "} /* endif */")
 (indent-according-to-mode)
 (newline)
 (indent-according-to-mode)
 (previous-line 3)
 (end-of-line)
 (goto-char (- (point) 3))
)


;; bind it to CTRL-c i
(define-key Ctl-C-keymap "i" 'pm-if)
Peter Miehle
+1  A: 

Acme http://plan9.bell-labs.com/sys/doc/acme/acme.ps

this is the Linux port http://swtch.com/plan9port/

uvts_cvs
A: 

Look into Anjuta. It's an IDE for GNOME/Glib type applications and to my knowledge is written in C, and has a plugin framework that should be useful.