Author Topic: USER KEYWORDS  (Read 17408 times)

jozzzz

  • Guest
USER KEYWORDS
« on: January 26, 2006, 01:13:34 pm »
HI, HOW I CAN ADD "USER KEYWORDS" TO CODEBLOCKS?
THANX FOR ALL ANSWER. :)

Offline AkiraDev

  • Multiple posting newcomer
  • *
  • Posts: 71
Re: USER KEYWORDS
« Reply #1 on: January 26, 2006, 01:23:13 pm »
In "settings", choose "editor", then go to the "syntax highlighting" category.
You should find a "Keywords" button there.

Offline Game_Ender

  • Lives here!
  • ****
  • Posts: 551
Re: USER KEYWORDS
« Reply #2 on: January 26, 2006, 06:43:36 pm »
AND TRY NOT TO USE TO MANY CAPS IN THOSE KEYWORDS ;)

post->setsarcasim("off");

sethjackson

  • Guest
Re: USER KEYWORDS
« Reply #3 on: January 26, 2006, 06:44:01 pm »
AND TRY NOT TO USE TO MANY CAPS IN THOSE KEYWORDS ;)

post->setsarcasim("off");

:lol:

jozzzz

  • Guest
Re: USER KEYWORDS
« Reply #4 on: February 02, 2006, 04:17:08 pm »
but  in  editors setings is two cases:   "Keywords" , and "User Keywords" :). I want change the "User Keywords" ,this have darkgreen color as default.
thx :)

jozzzz

  • Guest
Re: USER KEYWORDS
« Reply #5 on: February 02, 2006, 04:21:25 pm »
i want add some "User Keywords"...... plz ... :D

Offline thomas

  • Administrator
  • Lives here!
  • *****
  • Posts: 3979
Re: USER KEYWORDS
« Reply #6 on: February 02, 2006, 04:38:25 pm »
You can always edit the lexer file. Lexer files are called XXXXX-lexer.xml and are located in the shared/lexers directory. Then click on "Reset defaults" to make the editor reload from disk.
"We should forget about small efficiencies, say about 97% of the time: Premature quotation is the root of public humiliation."

jozzzz

  • Guest
Re: USER KEYWORDS
« Reply #7 on: February 04, 2006, 09:37:54 am »
Thanks  Thomas.
How i can edit   "User keyword" ?     

Keyword i edit if i press "edit keyword", but   User keyword is diferent. Is right?

What is User keyword?
Thx Joz

jozzzz

  • Guest
Re: USER KEYWORDS
« Reply #8 on: February 04, 2006, 09:50:31 am »
I need  words "public", "protected", "private"  they will have diferent color as that "Keyword".
How i can do this?
Exactly:
Keyword = int long case return etc. (blue color)

I want that  User keywords will:
private public  etc. 
:) thx


Offline thomas

  • Administrator
  • Lives here!
  • *****
  • Posts: 3979
Re: USER KEYWORDS
« Reply #9 on: February 04, 2006, 06:23:02 pm »
I need  words "public", "protected", "private"  they will have diferent color as that "Keyword".
How i can do this?
By editing the lexer... since you're apparently interested in C++, that'll be  lexer_cpp.xml.

Delete those words from the Language tag, and add them to the User tag. Then click on "Reload defaults" in editor options.
"We should forget about small efficiencies, say about 97% of the time: Premature quotation is the root of public humiliation."

jozzzz

  • Guest
Re: USER KEYWORDS
« Reply #10 on: February 04, 2006, 09:29:53 pm »
To Thomas:
I make this but color User keyword is some as Keyword. I have setings diferent color for both.Both have dark blue colors.
Examly:
            <Style name="Keyword"
                  index="5"
                  fg="0,0,160"
                  bold="1"/>
            <Style name="User keyword"
                  index="16"
                  fg="0,160,0"
                  bold="1"/>
>>
>>
>>

                  <Language index="0"
                        value="asm auto bool break case catch char class const"/>
                  <User index="1"
                        value= "private protected public"/>

jozzzz

  • Guest
Re: USER KEYWORDS
« Reply #11 on: February 07, 2006, 11:06:05 am »
plz help me , what i have to do ,so Keyword and User Keword have diferent color?  :shock:
to je v pedeli,  tady se nic nedozvim , v nastavim ruzne barvy a stejne mi to zobrazi vsecko modre

Offline mandrav

  • Project Leader
  • Administrator
  • Lives here!
  • *****
  • Posts: 4315
    • Code::Blocks IDE
Re: USER KEYWORDS
« Reply #12 on: February 07, 2006, 12:29:13 pm »
I really don't understand what's difficult about it.

1. Go to "Settings->Editor->Syntax highlighting".
2. Select the language you 're interested in.
3. Click "Reset defaults" to make sure the highlighter is sane.
4. Click "Keywords...", add your user keywords in, duh, "User:" and press OK.
5. Select the "User keyword" item in the list and edit it as you like.
Be patient!
This bug will be fixed soon...

PMike

  • Guest
Re: USER KEYWORDS
« Reply #13 on: February 07, 2006, 03:03:22 pm »
In r1916 build user keywords works just fine.
But I have a bit different feature request.
It is possible to have more than 1 group of user keywords (with different colors)?
4-5 groups should be enough, I think :)

Regards, Michael

jozzzz

  • Guest
Re: USER KEYWORDS
« Reply #14 on: February 07, 2006, 07:13:14 pm »
Thanks Mistr,  its OK..  uz to slape :)))))))))  uraaaaaaaa :)))))))