Preparing gedit for programming 5 5 1

Preparing gedit for programming

View previous topic View next topic Go down

Preparing gedit for programming

Post by BIT0122-Amit on Thu May 20, 2010 1:05 pm

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:


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
Founder

Course(s):
  • BIT

Blood Group: O+
Posts: 4187
Points: 6601

View user profile http://iitdu.forumsmotion.com

Back to top Go down

Use gedit as C/C++ IDE

Post by BIT0102-Mohaimin on Sat May 22, 2010 5:38 pm

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:
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
Programmer

Course(s):
  • BIT

Blood Group: B+
Posts: 415
Points: 713

View user profile

Back to top Go down

Re: Preparing gedit for programming

Post by BIT0102-Mohaimin on Sat May 22, 2010 5:41 pm

I think auto completion and some other features are also available.

BIT0102-Mohaimin
Programmer
Programmer

Course(s):
  • BIT

Blood Group: B+
Posts: 415
Points: 713

View user profile

Back to top Go down

Re: Preparing gedit for programming

Post by BIT0122-Amit on Sat May 22, 2010 5:44 pm

As this two topics deals with the same style of tweaking, I think I should merge them Smile
But good work Mohaimin. Keep it up Wink
You are Cool!

_________________________________________________________________
Adminship / Moderatorship is not about power, it is about Responsibility.

|About me|My Blog|

BIT0122-Amit
Founder
Founder

Course(s):
  • BIT

Blood Group: O+
Posts: 4187
Points: 6601

View user profile http://iitdu.forumsmotion.com

Back to top Go down

Re: Preparing gedit for programming

Post by BIT0102-Mohaimin on Sat May 22, 2010 5:59 pm

U missed the link I gave...
this one...

BIT0102-Mohaimin
Programmer
Programmer

Course(s):
  • BIT

Blood Group: B+
Posts: 415
Points: 713

View user profile

Back to top Go down

Re: Preparing gedit for programming

Post by BIT0122-Amit on Sat May 22, 2010 6:01 pm

BIT0102-Mohaimin wrote:U missed the link I gave...
this one...


this is the first time I am seeing this link..
Err... I missed it how?

_________________________________________________________________
Adminship / Moderatorship is not about power, it is about Responsibility.

|About me|My Blog|

BIT0122-Amit
Founder
Founder

Course(s):
  • BIT

Blood Group: O+
Posts: 4187
Points: 6601

View user profile http://iitdu.forumsmotion.com

Back to top Go down

Re: Preparing gedit for programming

Post by BIT0122-Amit on Fri Oct 15, 2010 11:20 am

Added extreme plugins, class browser.

All users of gedit are requested to check it out Cool!

_________________________________________________________________
Adminship / Moderatorship is not about power, it is about Responsibility.

|About me|My Blog|

BIT0122-Amit
Founder
Founder

Course(s):
  • BIT

Blood Group: O+
Posts: 4187
Points: 6601

View user profile http://iitdu.forumsmotion.com

Back to top Go down

Re: Preparing gedit for programming

Post by BIT0220-Iftekhar on Fri Oct 15, 2010 6:16 pm

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

BIT0220-Iftekhar
Administrator-RC

Course(s):
  • BIT

Blood Group: B+
Posts: 431
Points: 623

View user profile http://iftekharunplugged.blogspot.com

Back to top Go down

Re: Preparing gedit for programming

Post by BIT0122-Amit on Fri Oct 15, 2010 8:55 pm

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
Founder

Course(s):
  • BIT

Blood Group: O+
Posts: 4187
Points: 6601

View user profile http://iitdu.forumsmotion.com

Back to top Go down

View previous topic View next topic Back to top


Permissions in this forum:
You cannot reply to topics in this forum