Komodo / macros

This repository is deprecated, do not update it. To submit your own macros read the instructions here: http://komodoide.com/packages/submit-instructions/#pane-packages

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Komodo Macros

This is a collection of useful Komodo macros.

Table of Contents

Macros

Wrap Text (code)

Wrap the editor selection with arbitrary text. Easily enclose text with HTML tags or stringify a selection.

PHPDoc and JSDoc (code)

Automatically adds PHPdoc (or JSDoc) comments, including a summary, to your PHP (or JavaScript) file when you type '/**' followed by the ENTER key.

If the line below the current position is a function, variable or class it will check for an toolbox Abbreviation and add it's contents to the phpdoc comment.

Incremental Numbering (code)

Make a column selection in the editor, then for each column insert a number and have the number incremented for each subsequent row in the selection.

Copy Find Results (code)

A macro that will copy the existing Find Results onto the clipboard. Note: There can be two find results pane opened - this only works on the first one.

Multi Row Editor Tabs (code)

Allow multiple rows of editor tabs. When there is not enough room for all tabs in a single row, the tabs will wrap around onto a new tab row.

Variable Dumper (code)

Debug helper - generates a print statement from the current word or selection.

Swap Assignment (code)

Switch a variable assignment (or argument) around, so foo = bar will become bar = foo.

SCC Annotate (code)

Display source code control (SCC) line annotations in the left editor margin.

Automagic Snippets From Text (code)

Create a snippet from selected text, add a name and automatically open properties to add keybinding.

Reorder lines as tower (code)

Reorder selected lines, so that the shortest will go to top and the longest goes to bottom. Useful when reordering "import" lines in Python source code.

Left pare (code)

Remove 1 character form selected line on the left. Useful to clean code copied from diff file.

Brace Wrap Selection (code)

With an editor selection, pressing any of [{("' keys will place matching braces or quotes around the selected text. Differs from Wrap Text because this is a startup macro, and doesn't need to be invoked each time.

Byte or Char Position (code)

Show the Byte or Char position of your cursor in the Statusbar beside Ln and Col.

Img Tag Dimensions (code)

Execute the macro insdie an img tag in an html file, which the src attribute filled in. The macro will load the image and input the height and width of the image attributes with the correct dimensions

Alternative Location (code)

Adds an editor tab context menuitem for opening a komodo file in an alternative location. The alternative locations are read from a locations.ini configuration file in the Komodo profile directory.

Comment Toggle (code)

Toggles comments (on or off) over the selected lines (or current line) of the editor.

Installing

Create a new macro in your Komodo toolbox and copy/paste the contents into the Komodo macro editor.

Contributing

Got a handy macro yourself? Please submit a pull request to have your macro added to this list.

About

This repository is deprecated, do not update it. To submit your own macros read the instructions here: http://komodoide.com/packages/submit-instructions/#pane-packages

License:Mozilla Public License 2.0


Languages

Language:JavaScript 88.9%Language:Python 11.1%