In IntelliJ IDEA, the Code editor does not allow moving the cursor or inserting white spaces bottom of the file.
Adding spaces to the end of the file is called virtual space.
It disables the virtual spaces in the code editor by default.
This post shows multiple ways to enable virtual spaces.
This tutorial talks about multiple ways to view the Javadoc tooltip for a method in an editor.
How to enable virtual spaces or add whitespaces at the end of the file.
There are 2 ways, we can do it. First use settings, Second way is using Find Actions.
Using settings: Please follow the following steps
- Go to
Sto open Settings Window
- In the Virtual space panel option,
- Check the
Show the virtual spaces at the bottom of the fileoption as given below Other options
- Allow placement of caret after end of line
- Allow placement of caret inside tabs.
- Click the
Applybutton and OK to close the window
- Now, You can add whitespaces at the bottom of the file.
Using Find Actions
Find Actionor use shortcut
Ato open Settings Window
Virtual Spaceas given below
Select this option to open settings with the Virtual Space panel selected
Show the virtual spaces at the bottom of the fileoption
It shows empty spaces at the end of the file