Menu

11 May 2010

Simplest C++ editor for Linux

Open gedit Text Editor

Use the "External Tools" plugin. For compiling a single C++ file, you can set up gedit so that a single key will compile the program. For example, you can set up a g++ tool with options set up like this:

Description: Compile C++
Accelerator: F5
Command(s): g++ $GEDIT_CURRENT_DOCUMENT_NAME -o ${GEDIT_CURRENT_DOCUMENT_NAME%.*}
Input: Nothing
Output: Display in bottom pane
Applicability: All documents

With this tool set up, hitting the F5 function key opens up a console at the bottom of the window and runs g++ there. And with this:
 
Description: Run C++
Accelerator: F6
Command(s): ./${GEDIT_CURRENT_DOCUMENT_NAME%.*}
Input: Nothing
Output: Display in bottom pane
Applicability: All documents

hitting the function key F6 will run the program.

I found this from ubuntu forum

┌─────────────────────────┐
│    Narendra Sisodiya ( नरेन्द्र सिसोदिया )
│    Society for Knowledge Commons
│    Web : http://narendra.techfandu.org
└─────────────────────────┘

Posted via email from LUG@IITD Community Blog

Post a Comment