20

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.

3 Answers3

21

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.

Pax Beach
  • 2,059
  • 1
  • 20
  • 27
  • 2
    Be careful with this. As it says in the provided link: "Do not change platform properties in the default file, because it is replaced when WebStorm is updated. Moreover, in case of macOS, editing this file violates the application signature." – Createdd May 11 '21 at 13:01
  • 5
    Be sure to open the properties from the IDE using the menu Help->Edit Custom Properties... – Fede Garcia Feb 16 '22 at 15:18
3

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

1

The new approach would be to change that and restart IDE:
The recommended way of changing the platform properties in the recent product versions is from the Help | Edit Custom Properties menu. This action will create a copy of the .properties file in the IDE config directory and open an editor where you can change them. If you can't start IDE to access this menu, edit the file manually as described below.

You can change properties in the IDE_HOME\bin\idea.properties file for all the products, some popular properties that you may want to adjust:

#---------------------------------------------------------------------
# Maximum file size (kilobytes) IDE should provide code assistance for.
# The larger file is the slower its editor works and higher overall system memory requirements are
# if code assistance is enabled. Remove this property or set to very large number if you need
# code assistance for any files available regardless their size.
#---------------------------------------------------------------------
idea.max.content.load.filesize=512000
idea.max.intellisense.filesize=512000

https://intellij-support.jetbrains.com/hc/en-us/articles/206544869

Anand Varkey Philips
  • 1,811
  • 26
  • 41