Alex Rivera | Logout

What useful macros have you created in Netbeans?

Asked 2009-02-20T00:06:16.390
36

I use Netbeans (nightly build) for Ruby on Rails development and I'm looking to beef up my macros. I've created a few myself:

copy identifier:

select-identifier copy-to-clipboard

paste clipboard over identifier:

select-identifier paste-from-clipboard

double quote element

select-element-next "\""

single quote element:

select-element-next "'"

But I'm looking for other useful ones and Google is giving me nothing. The record macro feature usually doesn't work too well so I'd rather just "write" the macros myself but I can't even find a reference that lists what commands (like "select-identifier") are actually available.

Any Netbeans macro gurus out there?

Edit
Report

2 Answers

2

Oh well, just experimenting with netbeans.

I add a simple new macro for netbeans. name: "scrollup_newline" code: insert-break scroll-up

It works well, so every i press enter, the editor move one line down. This way i can code and have the caret in the middle of the editor.

answered 2012-02-03T09:03:34.013
0

I found Code Templates to be very useful, especially this one (for HTML):

<${tag}>${cursor}</${tag}>

The abbreviation is "tt", and it can also surround any text with custom tag, when called by the code template menu.

<${param_name default="tag"}${cursor}>
${selection}
</${param_name default="tag"}>

This one will surround anything with any tag. Select something, then Alt+F3, then just select this template from the menu. After that type the tag you want, e.g. "div".

answered 2012-01-27T15:01:08.897

Your Answer