How to disable the rectangular dashed selection mode of a file in Netbeans

How to disable the rectangular dashed selection mode of a file in Netbeans

Let's accept it, sometimes when we write a lot of code faster, we usually press combinations of keys in the wrong way, which leads to unexpected behaviour in the IDE. In this case, for netbeans, a lot of users with the same problem that i have, tend to enable the rectangular selection feature.

This feature allows the user to select some content of the editor with a rectangular shape, instead of selecting entire lines. The most common use case, is when you copy a snippet from a website that provides you with a piece of code that contains the number of the lines as well, for example:

Rectangular Selection Netbeans Example

As you can see, we can easily get rid of this with the rectangular selection, just selecting the numbers and deleting them. If just like me, you discovered this feature by accident, and probably don't want to use in this moment, you can enable/disable it easily.

Toggle Graphically

To disable/enable the rectangular selection just search for the Toggle Rectangular Selection button on the toolbar under the opened files:

Toggle Rectangular Selection NetBeans

Simply clicking on this icon will toggle this feature.

Toggle with Keyboard Shortcuts

If you like to use shortcuts instead, the following combinations on these platforms should do the trick:

  • On Windows and Linux: Ctrl + Shift + R
  • On Mac: Shift + Meta + R or Shift + Command + R

Happy coding !

This could interest you

Become a more social person