How do I turn off the unlimited whitespace in IntelliJ editor?

Intellij IdeaEditorText Cursor

Intellij Idea Problem Overview


How do I remove the ability to move the cursor after the end of line in IntelliJ?

Intellij Idea Solutions


Solution 1 - Intellij Idea

File menu -> Settings -> Editor -> General -> Virtual Space and uncheck 'Allow placement of caret after end of line' . You may also uncheck the other options in the Virtual Space panel.

Solution 2 - Intellij Idea

If the other answers don't seem to be working, you might have Column Selection Mode enabled. On my Mac it's mapped to Cmd+Shift+8. It's located under the Edit menu. That menu item will show a little checkmark when the mode is enabled.

Solution 3 - Intellij Idea

To get the expected behavior where indentations are respected when you click on a line :

In Preferences > Editor > Virtual Space

Check :

> Allow placement of caret inside tabs.

Uncheck :

> Allow placement of caret after end of line.

This was really annoying to me and makes very little sense as a default behavior to me.

Solution 4 - Intellij Idea

Note that for Intellij IDEA 11 for mac, settings are placed under the IntelliJ IDEA menu and called preferences. (Maybe some sort of mac default ?)

Solution 5 - Intellij Idea

What Matt_Bro said (first answer), but if you've already got the box unchecked in preferences, try re-checking it (I checked all the virtual space boxes) and restarting. Then uncheck and hit apply--at this point unlimited space was disabled for me.

Solution 6 - Intellij Idea

IntelliJ IDEA 2016

By default, it's turned off (unchecked).

If it is turned on, you can use one of the following 2 approaches:

  1. File > Settings... (or Ctrl+Alt+S) > Editor > General > Virtual Space section > uncheck Allow placement of caret after end of line

File > Settings

Editor General Allow placement

  1. Help > Find Action... (or Ctrl+Shift+A) > type "Virtual Space: Allow end" > Enter or left click (to switch between On and Off) > Esc

Help > Find Action

Allow Caret On Off

Attributions

All content for this solution is sourced from the original question on Stackoverflow.

The content on this page is licensed under the Attribution-ShareAlike 4.0 International (CC BY-SA 4.0) license.

Content TypeOriginal AuthorOriginal Content on Stackoverflow
QuestionJoshuaView Question on Stackoverflow
Solution 1 - Intellij IdeaalexpopescuView Answer on Stackoverflow
Solution 2 - Intellij IdeaStephen HendersonView Answer on Stackoverflow
Solution 3 - Intellij IdeaEmil DavtyanView Answer on Stackoverflow
Solution 4 - Intellij IdeaThomas NView Answer on Stackoverflow
Solution 5 - Intellij IdeacognalogView Answer on Stackoverflow
Solution 6 - Intellij IdeaROMANIA_engineerView Answer on Stackoverflow