Preparing gedit for programming
IITDU Forum :: TechTalks :: Ubuntu
Page 1 of 1 • Share •
Preparing gedit for programming
Hi guys 
Want to make your Gedit look like this?

(click on image to enlarge)
Then lets go ahead
Requirements:
Gedit
Instructions:
1. Gearing up
first of all, go to terminal, and type:
sudo apt-get install gedit-plugins
Now, it will install gedit plugins for you.
2. Enabling the gears
Open Gedit. go to Edit > Preferences
Under View Tab:
(do not disable anything which was enabled by default)
Enable Display line numbers
Enable HIghlight current line
Enable Highlight matching bracket
Under Editor tab:
(do not disable anything which was enabled by default)
Enable Automatic Indentation
Under Plugins Tab:
(do not disable anything which was enabled by default)
Enable advanced bookmarks
Enable Class browser
Enable Code comment
Enable Code formatter
Enable Embedded terminal
Enable External tools
Enable file browser pane
Enable Smart Indent
Enable Snippets
Enable Spell Checker
Enable Word Completion
(Do not worry if you can't find some plugins. Just enable whatever
matches.)
3. Downloading a nice theme
Download a nice theme from this address . In
this case, I have chosen DarkMate, which looks pretty cool to me. (right click on Darkmate and click on save as or save link as or save content as. whatever applies. Make sure that the downloaded file reads darkmate.xml, not darkmate.html or something like that)
4. Enabling a nice Theme:
Now that we have our theme, lets enable it.
there are two ways, one is the manual method (console based) and the
other is gedit gui based.
For the first one, simply type
sudo nautilus /usr/share/gtksourceview-2.0/styles/
and paste the darkmate.xml theme file there.
Or you can simply open gedit again, go to fonts and colors tabs, and
click on add. Then simply select the darkmate.xml file and you are done.

5. Bonus tip: using extra tools to compile and find errors for gcc
Open gedit> tools> manage external tools.
Click on the new/add button (it is on the bottom left corner). Now,
write:
echo "$GEDIT_CURRENT_DOCUMENT_NAME"
gcc "$GEDIT_CURRENT_DOCUMENT_NAME"
Like this:

Set the shortcut key to control F9
Now, when you have written a C code, press ctrl f9 and wala!! it will
compile the C file for you
If there are any errors, it will show you the errors with the necessary
information, including line linking. Also, you can make the gcc compiler
shortcut in the same way.
Extreme Plugins:
Symbol Browser:

This is an extremely useful plugin. it allows you to manage your function/classes more efficiently.
I have written a simple java code(for the sake of showing) to show you the power of it.
to install it, go to this link. There, download the ubuntu version of symbol browser.
Now type the following commands in terminal:
I hope this tutorial will be helpful to everyone.

Want to make your Gedit look like this?

(click on image to enlarge)
Then lets go ahead

Requirements:
Gedit
Instructions:
1. Gearing up
first of all, go to terminal, and type:
sudo apt-get install gedit-plugins
Now, it will install gedit plugins for you.
2. Enabling the gears
Open Gedit. go to Edit > Preferences
Under View Tab:
(do not disable anything which was enabled by default)
Enable Display line numbers
Enable HIghlight current line
Enable Highlight matching bracket
Under Editor tab:
(do not disable anything which was enabled by default)
Enable Automatic Indentation
Under Plugins Tab:
(do not disable anything which was enabled by default)
Enable advanced bookmarks
Enable Class browser
Enable Code comment
Enable Code formatter
Enable Embedded terminal
Enable External tools
Enable file browser pane
Enable Smart Indent
Enable Snippets
Enable Spell Checker
Enable Word Completion
(Do not worry if you can't find some plugins. Just enable whatever
matches.)
3. Downloading a nice theme
Download a nice theme from this address . In
this case, I have chosen DarkMate, which looks pretty cool to me. (right click on Darkmate and click on save as or save link as or save content as. whatever applies. Make sure that the downloaded file reads darkmate.xml, not darkmate.html or something like that)
4. Enabling a nice Theme:
Now that we have our theme, lets enable it.
there are two ways, one is the manual method (console based) and the
other is gedit gui based.
For the first one, simply type
sudo nautilus /usr/share/gtksourceview-2.0/styles/
and paste the darkmate.xml theme file there.
Or you can simply open gedit again, go to fonts and colors tabs, and
click on add. Then simply select the darkmate.xml file and you are done.

5. Bonus tip: using extra tools to compile and find errors for gcc
Open gedit> tools> manage external tools.
Click on the new/add button (it is on the bottom left corner). Now,
write:
echo "$GEDIT_CURRENT_DOCUMENT_NAME"
gcc "$GEDIT_CURRENT_DOCUMENT_NAME"
Like this:

Set the shortcut key to control F9
Now, when you have written a C code, press ctrl f9 and wala!! it will
compile the C file for you

If there are any errors, it will show you the errors with the necessary
information, including line linking. Also, you can make the gcc compiler
shortcut in the same way.
Extreme Plugins:
Symbol Browser:

This is an extremely useful plugin. it allows you to manage your function/classes more efficiently.
I have written a simple java code(for the sake of showing) to show you the power of it.
to install it, go to this link. There, download the ubuntu version of symbol browser.
Now type the following commands in terminal:
- Code:
cp gedit-symbol-browser-plugin-bin-ubuntu-(version_here).tar.gz ~/.gnome2/gedit/
cd ~/.gnome2/gedit
tar -xzf gedit-symbol-browser-plugin-bin-ubuntu-(version).tar.gz
sudo apt-get install exuberant-ctags
sudo apt-get install libgnomeprintui(version)
I hope this tutorial will be helpful to everyone.

Last edited by BIT0122-Amit on Fri Oct 15, 2010 11:19 am; edited 1 time in total
_________________________________________________________________
Adminship / Moderatorship is not about power, it is about Responsibility.
|About me|My Blog|

BIT0122-Amit- Founder

- Course(s):
- BIT
Blood Group: O+
Posts: 4187
Points: 6601

Use gedit as C/C++ IDE
I think you all know that gedit supports syntax highlighting for almost all common languages. However there are more IDE features available in gedit.
Today Rokon showed me one,
Embedded Terminal:A terminal will be added to bottom pane of gedit window.
I found two more,
Bracket completion: closing bracket auto added.
Comment code: Selected lines commented out.
To get these features, you need to install gedit plugins.
The terminal command is:
Its less than 350 kB. So feel free to download.
Now to activate the plug-ins goto
edit>preference>plugins
You will see all plugins installed. Choose the ones you need.
Today Rokon showed me one,
Embedded Terminal:A terminal will be added to bottom pane of gedit window.
I found two more,
Bracket completion: closing bracket auto added.
Comment code: Selected lines commented out.
To get these features, you need to install gedit plugins.
The terminal command is:
- Code:
sudo apt-get install gedit-plugins
Its less than 350 kB. So feel free to download.
Now to activate the plug-ins goto
edit>preference>plugins
You will see all plugins installed. Choose the ones you need.

BIT0102-Mohaimin- Programmer

- Course(s):
- BIT
Blood Group: B+
Posts: 415
Points: 713
Re: Preparing gedit for programming
I think auto completion and some other features are also available.

BIT0102-Mohaimin- Programmer

- Course(s):
- BIT
Blood Group: B+
Posts: 415
Points: 713
Re: Preparing gedit for programming
As this two topics deals with the same style of tweaking, I think I should merge them 
But good work Mohaimin. Keep it up
You are
But good work Mohaimin. Keep it up
You are

_________________________________________________________________
Adminship / Moderatorship is not about power, it is about Responsibility.
|About me|My Blog|

BIT0122-Amit- Founder

- Course(s):
- BIT
Blood Group: O+
Posts: 4187
Points: 6601

Re: Preparing gedit for programming
U missed the link I gave...
this one...
this one...

BIT0102-Mohaimin- Programmer

- Course(s):
- BIT
Blood Group: B+
Posts: 415
Points: 713
Re: Preparing gedit for programming
BIT0102-Mohaimin wrote:U missed the link I gave...
this one...
Err... I missed it how?
_________________________________________________________________
Adminship / Moderatorship is not about power, it is about Responsibility.
|About me|My Blog|

BIT0122-Amit- Founder

- Course(s):
- BIT
Blood Group: O+
Posts: 4187
Points: 6601

Re: Preparing gedit for programming
Added extreme plugins, class browser.
All users of gedit are requested to check it out
All users of gedit are requested to check it out

_________________________________________________________________
Adminship / Moderatorship is not about power, it is about Responsibility.
|About me|My Blog|

BIT0122-Amit- Founder

- Course(s):
- BIT
Blood Group: O+
Posts: 4187
Points: 6601

Re: Preparing gedit for programming
[at] Amit bhai--> I tell you, that was cool, and useful too.....rep++(if it was here)
the commands for installing symbol browser was horrible to me though, wasn't able to install that
[at] Mohaimin bhai--> the link you provided was rich and useful......rep++ to you also
the commands for installing symbol browser was horrible to me though, wasn't able to install that
[at] Mohaimin bhai--> the link you provided was rich and useful......rep++ to you also


BIT0220-Iftekhar- Administrator-RC
- Course(s):
- BIT
Blood Group: B+
Posts: 431
Points: 623

Re: Preparing gedit for programming
bit0220-Iftekhar wrote:[at] Amit bhai--> I tell you, that was cool, and useful too.....rep++(if it was here)![]()
the commands for installing symbol browser was horrible to me though, wasn't able to install that![]()
[at] Mohaimin bhai--> the link you provided was rich and useful......rep++ to you also
Hmm.... if you were not able to install that, it means you were not able to execute the commands.
You should copy paste the commands you used so that we can see and find what went wrong.
_________________________________________________________________
Adminship / Moderatorship is not about power, it is about Responsibility.
|About me|My Blog|

BIT0122-Amit- Founder

- Course(s):
- BIT
Blood Group: O+
Posts: 4187
Points: 6601

IITDU Forum :: TechTalks :: Ubuntu
Page 1 of 1
Permissions in this forum:
You cannot reply to topics in this forum
Active Topics!

» Understanding Timestamp Based Protocol
» Hi from Newbie
» Compare an image from a list of images in the sql database....tell which image is matching
» Sending email without email ID
» teach yourself c by herbert schildt pdf
» .NET MVC3: Unable to find the requested .Net Framework Data Provider. It may not be installed.
» SAD Slides: 4.1, 4.2
» QA topic Presentation - Urgent Notice