PDA

View Full Version : gedit & colours



despdan
18th June, 2009, 10:09 AM
Hope someone can explain this.
When using gedit to write or edit scripts I noticed that colours are used :

function system_info
{
# Temporary function stub
echo "function system_info"
}

is there a rule to these colours?

satman
18th June, 2009, 10:27 AM
gedit puts the colours in itself does it not?
colour aint important for processing the code.

despdan
18th June, 2009, 10:34 AM
gedit puts the colours in itself does it not?
colour aint important for processing the code.
Yes it does I just wanted to know what each colour was or what if anything it stood for?

satman
18th June, 2009, 10:37 AM
Yes it does I just wanted to know what each colour was or what if anything it stood for?

to make for a coder to eaiser to read!
no importance as far as i know.

you have your pink inside quotes as its a string
your red there is for function calls
and your blue is comments lines

rule of thumbs ;)

chroma
24th June, 2009, 11:37 PM
It just improves readability of code. the vast bulk of a programmers job nowadays is maintaining and contributing to existing code, so you need to read a lot of it.

When its coloured and formated to appropriate indentations then it makes your job a whole lot easier to just scan through to where the important/interesting portions are.

You can create your own colour schemes for the vast majority of editors even schemes for obscure languages the editor might not know about, i expect gedit will be no different (i dont use Gnome so checking is out of the question, im certain it should however)