Author Topic: Syntax highlighting for js files  (Read 5530 times)

Offline cichmen

  • Multiple posting newcomer
  • *
  • Posts: 12
Syntax highlighting for js files
« 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.

Offline ollydbg

  • Developer
  • Lives here!
  • *****
  • Posts: 5915
  • OpenCV and Robotics
    • Chinese OpenCV forum moderator
If some piece of memory should be reused, turn them to variables (or const variables).
If some piece of operations should be reused, turn them to functions.
If they happened together, then turn them to classes.

Offline Jenna

  • Administrator
  • Lives here!
  • *****
  • Posts: 7255
Re: Syntax highlighting for js files
« Reply #2 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.

Offline cichmen

  • Multiple posting newcomer
  • *
  • Posts: 12
Re: Syntax highlighting for js files
« Reply #3 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.