Jump to content
  • Advertisement
Sign in to follow this  
DarkRonin

Syntax highlighting in VS.net 2015

This topic is 537 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

Hi guys,

Does anyone know how (or if it is possible) to turn off syntax highlighting on a particular file? In my case a single 'header' file.

Thanks in advance :)

Share this post


Link to post
Share on other sites
Advertisement
Perhaps change the file extension to .txt or something? I'm guessing you'll still be able to #include it. Edited by Nypyren

Share this post


Link to post
Share on other sites

Yeah, that works, but you lose the syntax coloring then. Was hoping to keep the syntax colored but the underlining on errors removed.

Share this post


Link to post
Share on other sites
What about custom colors?

Save your old fonts and colors as a set, make a new set of fonts and colors where all the items are the color you are looking for, then save that as your uncolored set.

Since the file doesn't change extension it won't happen automatically, but you would get your custom color plain color set.

Share this post


Link to post
Share on other sites

Yeah, that works, but you lose the syntax coloring then. Was hoping to keep the syntax colored but the underlining on errors removed.


Now I'm confused. Are the errors impossible to fix?

Share this post


Link to post
Share on other sites

Yeah, that works, but you lose the syntax coloring then. Was hoping to keep the syntax colored but the underlining on errors removed.

Now I'm confused. Are the errors impossible to fix?

No errors, as such.

The include file is written in a language that VS doesn't recognise by default. Hence, all of the distracting red and green squiggles for the syntax it doesn't recognise.

Compiles file though. Just annoyingly distracting.

Share this post


Link to post
Share on other sites

turn off syntax highlighting on a particular file? In my case a single 'header' file.

Was hoping to keep the syntax colored but the underlining on errors removed.

The include file is written in a language that VS doesn't recognise by default. Hence, all of the distracting red and green squiggles for the syntax it doesn't recognise.
 

So you want to turn off syntax highlighting for a file, but also leave it on.  You want to have a file with a name extension that visual studio recognizes (sounds like .h) but not have it attempt to show compiler errors or syntax issues. 

 

For the latest change of requirements...

In the file's properties (accessed from the project view) I think modifying the build action to "None" or "Additional Files" or similar will make the underlining go away.

As for the syntax highlighting, you write once that you want it disabled and again that you want it enabled, so I'm not sure what you're doing there.   There are a few ways to change syntax highlighting keywords, to define new language keyword sets, and even to add entirely new language support to the IDE, as long as it fits the basic parsing rules.  Since the quoted statements are directly contradictory (want to turn it off entirely, also hoping to keep) I hope the documentation link is enough to figure out whatever it is you're trying to do.

Share this post


Link to post
Share on other sites
Are you referring to Intellisense's attempt of pointing out errors/suggestion by syntax highlighting? Because as pointed out, syntax highlighting and coloring are the same thing.

If that's all you want, try as above, alhough I suggest you use a different editor (e.g notepad++) all together in that case

Share this post


Link to post
Share on other sites

Found an option in the text editor. Funnily enough it is called 'enable squiggles'. Turning this off has done the job. I keep the nicely coloured text, but lose the distracting 'squiggles'.

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!