Neatbeans: editing PHP and double-clicking on a variable name

I recently moved from Dreamweaver (10+ years) to Netbeans and love it. The only problem I am encountering is that I use to double-click the PHP variable name and the code editor, automatically selecting the variable name, but NOT including the initial $.

So, if you double-click $ variableName, only the variable Name will be highlighted. In NetBeans, if you double-click $ variableName, you automatically select the full name of the variable and $.

I understand that this is a small problem, but I double-click on the variable names and drop them into bindParams about a hundred times a day, and this makes me gatki always delete $ after insertion.

Using Netbeans 7.4

+6
source share
1 answer

It sounds more like a macro for a repetitive task. If your clipboard has $categoryName , you can rotate

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

in

 $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 
+1
source

All Articles