Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

NetBeans 7 - How to remove Marked Occurrences when caret is moved away from variable?

Tags:

netbeans

In NetBeans 6.9, when you move the caret away from a variable its marked occurrences stop being marked. In NetBeans 7, they just remain marked. This is very annoying. How can I fix it?

I tried looking in the settings and there's nothing to fix this. I don't want to disable this cause I need it and I'll happily live with a solution where I'll have to use a keyboard shortcut to highlight occurrences.

like image 899
Mario Awad Avatar asked May 18 '11 07:05

Mario Awad


3 Answers

Great news! NetBeans 7.2 is out and it has the option properly implemented for PHP (In all previous 7.x versions it was only implemented for Java).

Go to "Tools -> Options -> Editor -> Highlighting" and uncheck the "Keep Marks" option.

Cheers!

like image 195
Mario Awad Avatar answered Nov 22 '22 05:11

Mario Awad


This seems to be a known bug: http://netbeans.org/bugzilla/show_bug.cgi?id=187627

No way around it, I'm afraid.

EDIT: of course, you can always get auto-(de)marked behavior by ticking check-box in Tools->Options->Editor->Mark Occurrences->Keep Marks

like image 28
zbstof Avatar answered Nov 22 '22 06:11

zbstof


In Netbeans 8.1 I've found that feature in the window below: Option to change marked occcurences

If you uncheck all checkboxes, editor will never highlight occurences. On the other hand you can prefer to check first checkbox in order to highlight occurences but when focus gone highlighting will disappear. (keep marks is unchecked)

like image 28
csonuryilmaz Avatar answered Nov 22 '22 04:11

csonuryilmaz