Code::Blocks Forums

User forums => Help => Topic started by: cichmen on June 18, 2009, 09:04:03 am

Title: Syntax highlighting for js files
Post by: cichmen on June 18, 2009, 09:04:03 am
Hi,

I would like to ask, if there is some other way how to configure CB to syntax highlight javascript files (.js)?

I added *.js to HTML/PHP/ASP/JS lexer filemasks, but no success.

I figured out, that it is possible to workaround it by adding "//<script>" at the begin of the file and "//</script>" at the and of the file. But I don't like it much.

C.
Title: Re: Syntax highlighting for js files
Post by: ollydbg on June 18, 2009, 09:10:21 am
If this wiki can help you
http://wiki.codeblocks.org/index.php?title=Creating_a_custom_lexer_for_Code::Blocks_editor
Title: Re: Syntax highlighting for js files
Post by: Jenna on June 18, 2009, 11:03:53 am
I use C::B for web-development and have added *.js to C/C++-lexer. That works good enough for me.
Title: Re: Syntax highlighting for js files
Post by: cichmen on June 18, 2009, 08:12:43 pm
Thanks for the advice, I added *.js into c/c++ lexer filemasks and "function" into keywords and it works prefectly.