Lightweight C/C++ editor with code completion and debugging

10,278

You could give a try to the default text editor, GEdit (it looks pretty decent on Xfce with a gtk theme). The gedit-plugins package contains, among many others others:

  • Bookmarks
  • Bracket Completion
  • Code block comment/uncomment
  • File Browser
  • Session persistence
  • Embedded Terminal

To these you may add a few additional plugins:

As for debugging there is nothing but you can use gdb within the integrated terminal.

And of course, you'll have the Oblivion theme, the best coding theme ever produced.

Further reading:

gedit: Add Python / C++ Autocomplete Support

How to convert gEdit to gEdit++

Share:
10,278

Related videos on Youtube

Andreas Unterweger
Author by

Andreas Unterweger

Updated on September 18, 2022

Comments

  • Andreas Unterweger
    Andreas Unterweger over 1 year

    Ever since the debugger plugin for geany stopped working (see below), I am looking for an editor for C/C++ source files with the following features:

    • Code completion (i.e., Intellisense-like completion of variable and function names as well as parameters)
    • Basic debugging capabilities (start/stop debugger, step-by-step execution, evaluate variable values on mouse hover or in a separate window)

    The editor should be as lightweight as possible. Eclipse, for example, has some nice features but it just too large in terms of disk space after installation. In case it is relevant, I am using Xubuntu (14.04) on one machine and an Ubuntu (14.04) Minimal installation with Xfce on another machine, for both of which I need a lightweight editor.

    So far, I tried Code::Blocks, which is nice, but requires me to create a new project to enable debugging functionality, which is annoying. I just want to use my custom Makefile and my C files without any additional project files or output folders.

    I previously used geany, which I really liked. However, since I set up my 14.04 machines, the debugger plugin crashes the whole application every time I want to use it. I even tried compiling the newest version of the plugin myself, but it still crashes, as confirmed also by others in the bug tracker. Furthermore, C++ code completion in geany has never been really good.

    Are there any alternatives out there, preferably free and available via apt-get?

    Thanks in advance Best regards Andreas

    • karel
      karel over 9 years
      possible duplicate of C programing suites/IDEs
    • Andreas Unterweger
      Andreas Unterweger over 9 years
      @karel: I already tried most of the IDEs from that list. I addressed the issues with the first three (codeblocks, geany and Eclipse) above; to add to that: monodevelop and netbeans (as Eclipse) are not lightweight. I am still trying the remaining ones, but without success so far.
    • Andreas Unterweger
      Andreas Unterweger over 9 years
      @karel: I had already tried that one, but could not remember what the issue with it was. Now that I reinstalled it and opened my example file, I recall: I create a new workspace => crash; I add a new file => crash; I start the debugger => crash. To be clear, by crash I mean the whole application closing without any further messages. I installed it using 'apt-get install --no-install-recommends codelite'
    • karel
      karel over 9 years
      I use Code::Blocks not CodeLite, but if you want to try installing CodeLite the same way I install Code::Blocks in essence, you can do it from the terminal by using this command: sudo apt-get install codelite gdb codelite-plugins . You might also be interested in RapidDisk LT from the Ubuntu Software Center. I haven't tried that either because I store my projects on an SSD.
    • Andreas Unterweger
      Andreas Unterweger over 9 years
      @karel: It still crashes on every other action I perform
    • karel
      karel over 9 years
      I edited my last comment as a reply, but I also want to add to it. I think about Geany as if it's magic. I can edit 50 html files at the same time in Geany, and then open all 50 files in a web browser, and Geany doesn't buckle under pressure. Maybe you can use a RAM drive to make CodeLite function more like the way Geany does.
    • Andreas Unterweger
      Andreas Unterweger over 9 years
      @karel: That's not the problem. Geany is working fine by itself - just the debugger plugin crashes (as also reported by numerous others). Regarding CodeLite, the application itself (even without any plugins) crashes on the actions that I mentioned above
    • Eran
      Eran over 9 years
      @Andreas: regarding CodeLite, the problem is that Ubuntu packagers are insisting on providing this buggy version (2.8 which is extremely old...), the current version available is 6.1. We (The CodeLite Team) manage our own repository for CodeLite and you can install it directly from here: codelite.org/LiteEditor/Repositories#toc1
  • Andreas Unterweger
    Andreas Unterweger over 9 years
    Nice, I did not know about the gedit plugins. It's a pity that there is no integrated gdb support. I'd upvote your post if I had enough reputation to do so.
  • Luís de Sousa
    Luís de Sousa over 9 years
    With your level of English you can quickly gain reputation by editing posts. Or you can try answering a few questions.
  • Andreas Unterweger
    Andreas Unterweger over 9 years
    Thanks, I'll try answering a few questions. Since I am not a native speaker, I'd rather refrain from editing :)