News:

As usual while waiting for the next release - don't forget to check the nightly builds in the forum.

Main Menu

Adding Syntax Highlighting to New File Types

Started by Maxpm, April 05, 2011, 04:12:43 AM

Previous topic - Next topic

Maxpm

How can I configure Code::Blocks so the syntax highlighting feature works with arbitrary file types?

I'm using the .tpp extension for template implementation, but without syntax highlighting it's rather difficult to see what I'm doing.

MortenMacFly

Quote from: Maxpm on April 05, 2011, 04:12:43 AM
How can I configure Code::Blocks so the syntax highlighting feature works with arbitrary file types?

I'm using the .tpp extension for template implementation, but without syntax highlighting it's rather difficult to see what I'm doing.
Add this to the "file types and associations", found in the project manager when you right click.
Compiler logging: Settings->Compiler & Debugger->tab "Other"->Compiler logging="Full command line"
C::B Manual: [url="https://www.codeblocks.org/docs/main_codeblocks_en.html"]https://www.codeblocks.org/docs/main_codeblocks_en.html[/url]
C::B FAQ: [url="https://wiki.codeblocks.org/index.php?title=FAQ"]https://wiki.codeblocks.org/index.php?title=FAQ[/url]

Jenna

Quote from: MortenMacFly on April 05, 2011, 06:39:35 AM
Quote from: Maxpm on April 05, 2011, 04:12:43 AM
How can I configure Code::Blocks so the syntax highlighting feature works with arbitrary file types?

I'm using the .tpp extension for template implementation, but without syntax highlighting it's rather difficult to see what I'm doing.
Add this to the "file types and associations", found in the project manager when you right click.
This only adds it to the correct filetype in the project-tree.
To get syntax highlighting, you have to add it to the filemask in  "Editor -> Syntax highlighting -> Syntax highlighting for: -> [type of your file]".

Maxpm