Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to turn off automatic selection "wrapping" in PHP NetBeans?

Tags:

php

netbeans

Say I've got the following line of code and I'm editing it in NetBeans:

$foo = new Bar;

Then I decide I want to replace 'new Bar' with a string instead. So I select |new Bar| with my mouse and then type the " key. Instead of getting:

$foo = ";

I instead get:

$foo = "new Bar";

I find this quite annoying and it does the same thing for the ', {, (, {, and / keys, and probably others as well.

How can I turn this off? I can't find an obvious setting for it in NetBeans 7.0.1 Preferences.

like image 424
Stu Avatar asked Oct 11 '22 05:10

Stu


1 Answers

Options - Editor - Code Completion - Disable Insert Closing Brackets Automatically

This also disables immediately entering closing quotes and brackets which you may not have wished for in the first place.

Frankly, it doesn't bother me at all. I remember finding it a bit annoying when I just started using netbeans, but I taught myself pressing delete or backspace every time I want to replace my selection with a character that could otherwise surround it. (And when I actually do want to quote or parenthesise a selection, I find this behaviour coming in quite handy.)

like image 88
Pelle Avatar answered Oct 17 '22 22:10

Pelle