Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to fix: "The file is too large: __ , showing a read-only preview of the first: __" in Intellij IDEA?

I am trying to view a large file in Intellij IDEA, but I am coming across the error: "The file is too large: 30.1 MB, showing a read-only preview of the first 2.56 MB".

I have seen some previous answers to this question including:

IntelliJ can't display big file?

IntelliJ Idea 12 - Java file is too large for editor

The issue is that I cannot find a idea.max.intellisense.filesize or idea.max.content.load.filesize to edit.

When I click Help | Edit Custom Properties in Intellij, it says " File '~/Library/Preferences/IdeaC2018.3/idea.properties' does not exist. Create?"

When I create the file and add "idea.max.intellisense.filesize=2500" and "idea.max.content.load.filesize=20000", it has no effect. In fact, I am getting typo errors.

I have also seen https://intellij-support.jetbrains.com/hc/en-us/articles/206544869 , and I also have no IDE_HOME directory.

I am not sure how to approach from here, can anyone help?

Thanks.

like image 375
CuriousProgrammer70184 Avatar asked Apr 11 '19 06:04

CuriousProgrammer70184


People also ask

How do I change a read only file in IntelliJ?

To toggle read-only attribute of a file, open file in the editor, or select it in the Project tool window. Do one of the following: On the main menu, choose File | File Properties | Make File Read-Only , or Make File Writable .

How create properties file in Java IntelliJ?

Create a properties fileRight-click a directory where you would like to create the file. From the context menu of the target directory, choose New | File. In the New File dialog, type the filename with the corresponding extension . properties, and click OK.

Where can I find idea properties?

Locate the idea. properties file in the bin directory in IntelliJ IDEA's installation directory. The default location is C:/Program Files/JetBrains/IntelliJ IDEA Community Edition 10.5.


2 Answers

Jet Brains added a good documentation for tuning IDE.

You need to set the parameter in the "idea.properties" file

idea.max.content.load.filesize=512000

See more here.

like image 170
Pax Beach Avatar answered Sep 18 '22 08:09

Pax Beach


So my solution to the problem was correct. I just had to restart IntelliJ and then it started working.

like image 39
CuriousProgrammer70184 Avatar answered Sep 17 '22 08:09

CuriousProgrammer70184