6

I have recently made the switch from Dreamweaver (10+ years) to Netbeans and am loving it. The only issue I'm having is I'm use to being able to double click a PHP variable name and the code editor auto selecting the variable name but NOT including the leading $.

So if you double click $variableName only variableName gets highlighted. In NetBeans if you double click $variableName , you automatically select the entire variable name and the $.

I understand it's a small issue, but I double click variable names and drop them into bindParams about a hundred times a day and it's driving me nuts to have to always remove the $ after pasting.

Using Netbeans 7.4

Ryan
  • 804
  • 1
  • 11
  • 24
  • i've checked it but the only thing i could find is that the double click behaviour can't be changed in netbeans. – nowhere Feb 28 '14 at 11:30
  • Ok, thanks for looking CosLu – Ryan Mar 01 '14 at 17:18
  • +1 it drives me crazy as well also for the '-' as in button-big. it's treated differently in HTML, JS, CSS, PHP some consider it as a part of the var name some consider it as a separator. – Mohammed Joraid Mar 02 '14 at 16:27

1 Answers1

1

Sounds rather like a macro for repetitive task. If you have $categoryName in your clipboard, you can turn

$data->bindParam(|); // | is where cursor is

into

$data->bindParam(':categoryName', $categoryName);

with this simple macro: (tools->options->Editor->macros tab->new, name it, paste code, set shourtcut)

"':" paste-from-clipboard caret-forward ", " paste-from-clipboard match-brace caret-forward caret-forward delete-next caret-end-line
dev-null-dweller
  • 29,274
  • 3
  • 65
  • 85
  • Good idea, but not really what I'm looking for. Guess in the end I just really would like to be able to double click a php variable and not have it select the $. I try and use the same variable names across multiple languages (php, mySQL, html and Jquery) and they all work nicely together, cept that all php variables start with the $. – Ryan Feb 09 '14 at 00:19