Dienstag, 5. April 2011

JEdit macro to easily comment/ uncomment code blocks

It seems I'm in the mood of writing macros for jedit today. So I just wrote a macro to easily comment/ uncomment a selected code block. You can download the macro here.

How to install
  1. Download the file.
  2. Copy it to your .jedit/macros folder. You can also create a subfolder "Ruby" and place it there.
  3. Open jedit and select Macros / Rescan Macros.
  4. You should see a macro called "Block Comment" now.
How to use
  1. Write your ruby code in jedit as you normally do.
  2. Select a code block and execute the macro.
  3. The code block is now commented out.
  4. Select the same code block again and execute the macro.
  5. The code block is now uncommented again.
I hope you find this macro as useful as I do and enjoy using it.

PS: For better usability I recommend to make a shortcut for the macro (ex. CTRL-k).

Keine Kommentare:

Kommentar veröffentlichen