Author Topic: Adding Syntax Highlighting to New File Types  (Read 8218 times)

Maxpm

  • Guest
Adding Syntax Highlighting to New File Types
« 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.

Offline MortenMacFly

  • Administrator
  • Lives here!
  • *****
  • Posts: 9694
Re: Adding Syntax Highlighting to New File Types
« Reply #1 on: April 05, 2011, 06:39:35 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: https://www.codeblocks.org/docs/main_codeblocks_en.html
C::B FAQ: https://wiki.codeblocks.org/index.php?title=FAQ

Offline Jenna

  • Administrator
  • Lives here!
  • *****
  • Posts: 7255
Re: Adding Syntax Highlighting to New File Types
« Reply #2 on: April 05, 2011, 07:07:37 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

  • Guest
Re: Adding Syntax Highlighting to New File Types
« Reply #3 on: April 06, 2011, 06:13:11 am »
That did the trick.  Thanks!