1

Yet another silly question. I am using netbeans, and need to know how to autoformat a line when I type semicolon.

Example

type var=new type();
type var = new type();
Til
  • 5,150
  • 13
  • 26
  • 34
Tom Magaro
  • 181
  • 3
  • 13

1 Answers1

1

To accomplish this do the following

  1. Type in the statement without hitting the semicolon
  2. Click on the red circle on editor toolbar(Start Macro Recording)
  3. Type a semicolon followed by alt shift F followed by a backspace(needed to remove extra semicolon)
  4. Click on the icon Stop Macro Recording (next to the Start)

NetBeans will prompt you for a macro name, I called mine formatline

Completing a statement with a semicolon will now reformat the the line.

GhostCat
  • 137,827
  • 25
  • 176
  • 248
Tom Magaro
  • 181
  • 3
  • 13