Is it possible to force idea to treat the editor content as an raw text?

Sometimes when i work with a huge markup sql/xml/cvs files idea trying to parse it and works slowly. On other hand i do not want to treat all sql files as a plain text. So, it will be convinient to me to open a huge file in a resource cheap manner. Is it possible? This is because i need to switch to a notepad++ to edit sql. it provides basic highlightning and runs very fast even on a huge files.
P.S. Also, consider a user who ocassinously click a huge file in idea - it could freeze it for a minutes and even crash it.  If idea can estimate file complexity and open it in a resource safe mode, it will be nice feature.

0
2 comments
Avatar
Permanently deleted user

You can suppress all inspections for a class via a quick fix action. (see http://www.jetbrains.com/idea/webhelp/suppressing-inspections.html) You could also create a basic inspection profile, and then switch back and forth between it an a more robust one. (This of course would limit inspections for all files). In both cases, IDEA would still provide syntax highlighting and linking. I do not believe there is a way to tell IDEA to simply treat a file as raw text. A hack would be to temporarily rename the file to a .txt extension so IDEA treats it as raw text.

ashitkin.alex wrote:


P.S. Also, consider a user who ocassinously click a huge file in idea - it could freeze it for a minutes and even crash it.  If idea can estimate file complexity and open it in a resource safe mode, it will be nice feature.


This is use case is already handled. IDEA will not parse files over a specified size. The size is set via the idea.max.intellisense.filesize property in the idea.properties file. It's default value is 2500KB.

0

Hi Mark, thanks for your brilliant answer. idea.max.intellisense.filesize works fine for me. sql files making idea hangs is about ~2mb, thus before treshold. With treshold lower - everything runs

0

Please sign in to leave a comment.